Skip to content

Commit

Permalink
Fix new clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Oct 5, 2024
1 parent 2fb2903 commit 9c86e25
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/unix/apple/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ pub(crate) struct SystemInner {
pub(crate) struct Wrap<'a>(pub UnsafeCell<&'a mut HashMap<Pid, Process>>);

#[cfg(all(target_os = "macos", not(feature = "apple-sandbox")))]
unsafe impl<'a> Send for Wrap<'a> {}
unsafe impl Send for Wrap<'_> {}
#[cfg(all(target_os = "macos", not(feature = "apple-sandbox")))]
unsafe impl<'a> Sync for Wrap<'a> {}
unsafe impl Sync for Wrap<'_> {}

fn boot_time() -> u64 {
let mut boot_time = timeval {
Expand Down
4 changes: 2 additions & 2 deletions src/unix/freebsd/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ pub(crate) struct WrapMap<'a>(
);

#[cfg(feature = "system")]
unsafe impl<'a> Send for WrapMap<'a> {}
unsafe impl Send for WrapMap<'_> {}
#[cfg(feature = "system")]
unsafe impl<'a> Sync for WrapMap<'a> {}
unsafe impl Sync for WrapMap<'_> {}

#[cfg(feature = "system")]
#[repr(transparent)]
Expand Down
4 changes: 2 additions & 2 deletions src/unix/linux/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ impl<'a, T> Wrap<'a, T> {
}

#[allow(clippy::non_send_fields_in_send_ty)]
unsafe impl<'a, T> Send for Wrap<'a, T> {}
unsafe impl<'a, T> Sync for Wrap<'a, T> {}
unsafe impl<T> Send for Wrap<'_, T> {}
unsafe impl<T> Sync for Wrap<'_, T> {}

#[inline(always)]
fn compute_start_time_without_boot_time(parts: &Parts<'_>, info: &SystemInfo) -> u64 {
Expand Down

0 comments on commit 9c86e25

Please sign in to comment.