Skip to content

Commit

Permalink
Make cargo clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Officeyutong committed Dec 6, 2024
1 parent cf90e5a commit 538a4bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "quanta"
version = "0.12.3"
authors = ["Toby Lawrence <[email protected]>"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.70"

license = "MIT"

Expand Down
1 change: 0 additions & 1 deletion src/clocks/monotonic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ mod wasm_wasi;
#[cfg(all(target_arch = "wasm32", target_os = "wasi"))]
pub use self::wasm_wasi::Monotonic;


#[cfg(not(any(target_os = "windows", target_arch = "wasm32")))]
mod unix;
#[cfg(not(any(target_os = "windows", target_arch = "wasm32")))]
Expand Down
4 changes: 2 additions & 2 deletions src/clocks/monotonic/wasm_browser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const WASM_UNABLE_TO_CAST_PERF: &str =
"Unable to cast `globalThis.performance` to Performance type";

thread_local! {
static GLOBAL_PERFORMANCE_INSTANCE: OnceCell<Performance> = OnceCell::new();
static GLOBAL_PERFORMANCE_INSTANCE: OnceCell<Performance> = const { OnceCell::new() };
}

#[derive(Clone, Copy, Debug, Default)]
Expand All @@ -34,6 +34,6 @@ impl Monotonic {
performance_instance.now()
});
// `performance.now()` returns the time in milliseconds.
return f64::trunc(now * 1_000_000.0) as u64;
f64::trunc(now * 1_000_000.0) as u64
}
}

0 comments on commit 538a4bd

Please sign in to comment.