diff options
Diffstat (limited to 'perf-event/src')
| -rw-r--r-- | perf-event/src/hooks.rs | 1 | ||||
| -rw-r--r-- | perf-event/src/lib.rs | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/perf-event/src/hooks.rs b/perf-event/src/hooks.rs index d79331f..7cb9d40 100644 --- a/perf-event/src/hooks.rs +++ b/perf-event/src/hooks.rs @@ -134,6 +134,7 @@ macro_rules! expand_trait_method { #[doc = stringify!($ioctl)] /// . #[allow(non_snake_case)] + /// # Safety unsafe fn $name(&mut self, _fd: c_int, _arg: $arg_type) -> c_int { panic!( "unimplemented `perf_event::hooks::Hooks` method: {}", diff --git a/perf-event/src/lib.rs b/perf-event/src/lib.rs index e09de18..babab41 100644 --- a/perf-event/src/lib.rs +++ b/perf-event/src/lib.rs @@ -429,7 +429,7 @@ pub struct CountAndTime { pub time_running: u64, } -impl<'a> EventPid<'a> { +impl EventPid<'_> { // Return the `pid` arg and the `flags` bits representing `self`. fn as_args(&self) -> (pid_t, u32) { match self { @@ -1037,7 +1037,7 @@ impl std::ops::Index<&Counter> for Counts { impl std::fmt::Debug for Counts { fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result { - fmt.debug_map().entries(self.into_iter()).finish() + fmt.debug_map().entries(self).finish() } } |
