Skip to content

Commit

Permalink
style: make clippy happy
Browse files Browse the repository at this point in the history
Signed-off-by: lzzzt <[email protected]>
  • Loading branch information
Lzzzzzt committed Feb 24, 2025
1 parent 2b697f1 commit ef9e662
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
9 changes: 4 additions & 5 deletions monoio/src/driver/op/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,10 @@ impl<T: IoBuf> Op<SendMsgUnix<T>> {
buf: T,
socket_addr: Option<UnixSocketAddr>,
) -> io::Result<Self> {
let mut info: Box<(Option<UnixSocketAddr>, IoVecMeta, libc::msghdr)> = Box::new((
socket_addr.map(Into::into),
IoVecMeta::from(&buf),
unsafe { std::mem::zeroed() },
));
let mut info: Box<(Option<UnixSocketAddr>, IoVecMeta, libc::msghdr)> =
Box::new((socket_addr, IoVecMeta::from(&buf), unsafe {
std::mem::zeroed()
}));

info.2.msg_iov = info.1.write_iovec_ptr();
info.2.msg_iovlen = info.1.write_iovec_len() as _;
Expand Down
2 changes: 0 additions & 2 deletions monoio/src/fs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ use std::{io, path::Path};

pub use file::File;

use crate::driver::op::Op;

#[cfg(feature = "mkdirat")]
mod dir_builder;
#[cfg(feature = "mkdirat")]
Expand Down
2 changes: 1 addition & 1 deletion monoio/src/utils/rand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl FastRand {
let s0 = self.two.get();

s1 ^= s1 << 17;
s1 = s1 ^ s0 ^ s1 >> 7 ^ s0 >> 16;
s1 = s1 ^ s0 ^ (s1 >> 7) ^ (s0 >> 16);

self.one.set(s0);
self.two.set(s1);
Expand Down

0 comments on commit ef9e662

Please sign in to comment.