Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
pd0wm committed May 11, 2024
1 parent 02dc4e7 commit 5e653c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/socketcan/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
}
Expand Down
4 changes: 2 additions & 2 deletions src/socketcan/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit 5e653c3

Please sign in to comment.