mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -04:00
Forbid uses of unwrap() in the code (#7795)
This commit is contained in:
@@ -23,7 +23,7 @@ impl Stopwatch {
|
||||
}
|
||||
|
||||
pub fn pause(&mut self) {
|
||||
let start = self.start.take().unwrap();
|
||||
let start = self.start.take().expect("Stopwatch is not running");
|
||||
let duration = start.elapsed();
|
||||
self.total_time_ns += duration.as_nanos();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user