diff --git a/aya/src/maps/sock/sock_map.rs b/aya/src/maps/sock/sock_map.rs index 42246c8b..090ccf84 100644 --- a/aya/src/maps/sock/sock_map.rs +++ b/aya/src/maps/sock/sock_map.rs @@ -77,7 +77,7 @@ impl> SockMap { let fd: &MapFd = self.inner.borrow().fd(); // TODO(https://github.com/rust-lang/rfcs/issues/3066): avoid this unsafe. // SAFETY: `SockMapFd` is #[repr(transparent)] over `MapFd`. - unsafe { std::mem::transmute(&fd) } + unsafe { std::mem::transmute(fd) } } }