mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Add assert messages and print bad argument values in asserts (#5216)
Enabled the `missing_assert_message` lint * [x] I have followed the instructions in the PR template --------- Co-authored-by: Lucas Meurer <lucasmeurer96@gmail.com>
This commit is contained in:
@@ -18,7 +18,7 @@ impl Stopwatch {
|
||||
}
|
||||
|
||||
pub fn start(&mut self) {
|
||||
assert!(self.start.is_none());
|
||||
assert!(self.start.is_none(), "Stopwatch already running");
|
||||
self.start = Some(Instant::now());
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ impl Stopwatch {
|
||||
}
|
||||
|
||||
pub fn resume(&mut self) {
|
||||
assert!(self.start.is_none());
|
||||
assert!(self.start.is_none(), "Stopwatch still running");
|
||||
self.start = Some(Instant::now());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user