Skip to content

Commit

Permalink
add private field to squash lints for unit-structs-via-default
Browse files Browse the repository at this point in the history
  • Loading branch information
tobz committed Oct 4, 2023
1 parent c8637d8 commit 6357b90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/clocks/monotonic/unix.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#[derive(Clone, Copy, Debug, Default)]
pub struct Monotonic;
pub struct Monotonic {
_default: (),
}

impl Monotonic {
#[allow(clippy::cast_sign_loss)]
Expand Down
4 changes: 3 additions & 1 deletion src/clocks/monotonic/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ const WASM_WRONG_ENV: &str = "failed to find the global `window` object: the `wa
const WASM_MISSING_WINDOW_PERF: &str = "failed to find `window.performance`";

#[derive(Clone, Copy, Debug, Default)]
pub struct Monotonic;
pub struct Monotonic {
_default: (),
}

#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]
impl Monotonic {
Expand Down

0 comments on commit 6357b90

Please sign in to comment.