forked from 1b-agent/opencadstudio-upstream
style: apply cargo fmt across workspace
This commit is contained in:
1 parent
85710e5454
commit
9cf9ff2c5c
531 files changed
+57740
-33906
No files matched your search
+6
-2
@@ -46,7 +46,9 @@ pub fn note_update_time(duration_us: u64) {
|
||||
/// Mark when view() finishes, to time the layout/draw gap until prepare().
|
||||
pub fn note_view_finish() {
|
||||
if enabled() {
|
||||
let mut guard = VIEW_FINISH_INSTANT.lock().unwrap_or_else(|e| e.into_inner());
|
||||
let mut guard = VIEW_FINISH_INSTANT
|
||||
.lock()
|
||||
.unwrap_or_else(|e| e.into_inner());
|
||||
*guard = Some(iced::time::Instant::now());
|
||||
}
|
||||
}
|
||||
@@ -56,7 +58,9 @@ pub fn take_view_to_prepare_ms() -> Option<f64> {
|
||||
if !enabled() {
|
||||
return None;
|
||||
}
|
||||
let mut guard = VIEW_FINISH_INSTANT.lock().unwrap_or_else(|e| e.into_inner());
|
||||
let mut guard = VIEW_FINISH_INSTANT
|
||||
.lock()
|
||||
.unwrap_or_else(|e| e.into_inner());
|
||||
guard.take().map(|t| t.elapsed().as_secs_f64() * 1000.0)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user