diff --git a/src/socketcan/frame.rs b/src/socketcan/frame.rs index 1d2ba1c..fac6379 100644 --- a/src/socketcan/frame.rs +++ b/src/socketcan/frame.rs @@ -2,12 +2,10 @@ use libc::{can_frame, canfd_frame, canid_t, CANFD_MAX_DLEN, CAN_EFF_FLAG, CAN_MA use crate::can::{Frame, Identifier}; -#[inline(always)] pub fn can_frame_default() -> can_frame { unsafe { std::mem::zeroed() } } -#[inline(always)] pub fn canfd_frame_default() -> canfd_frame { unsafe { std::mem::zeroed() } } diff --git a/src/socketcan/socket.rs b/src/socketcan/socket.rs index 9922c0f..c9cc8f6 100644 --- a/src/socketcan/socket.rs +++ b/src/socketcan/socket.rs @@ -49,12 +49,12 @@ impl CanFdSocket { true => { let frame = canfd_frame::from(frame); let bytes = as_bytes(&frame); - self.as_raw_socket().write_all(&bytes) + self.as_raw_socket().write_all(bytes) } false => { let frame = can_frame::from(frame); let bytes = as_bytes(&frame); - self.as_raw_socket().write_all(&bytes) + self.as_raw_socket().write_all(bytes) } } }