Skip to content

Commit

Permalink
fix(net): make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Berrysoft committed Oct 20, 2024
1 parent 1e22351 commit 48581fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compio-net/src/cmsg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cfg_if::cfg_if! {
/// Reference to a control message.
pub struct CMsgRef<'a>(sys::CMsgRef<'a>);

impl<'a> CMsgRef<'a> {
impl CMsgRef<'_> {
/// Returns the level of the control message.
pub fn level(&self) -> i32 {
self.0.level()
Expand Down
4 changes: 2 additions & 2 deletions compio-net/src/cmsg/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use libc::{CMSG_DATA, CMSG_FIRSTHDR, CMSG_LEN, CMSG_NXTHDR, CMSG_SPACE, c_int, c

pub(crate) struct CMsgRef<'a>(&'a cmsghdr);

impl<'a> CMsgRef<'a> {
impl CMsgRef<'_> {
pub(crate) fn level(&self) -> c_int {
self.0.cmsg_level
}
Expand All @@ -23,7 +23,7 @@ impl<'a> CMsgRef<'a> {

pub(crate) struct CMsgMut<'a>(&'a mut cmsghdr);

impl<'a> CMsgMut<'a> {
impl CMsgMut<'_> {
pub(crate) fn set_level(&mut self, level: c_int) {
self.0.cmsg_level = level;
}
Expand Down

0 comments on commit 48581fa

Please sign in to comment.