Skip to content

Commit 4550e6f

Browse files
author
Lucas Paixão
committed
Clippy and fmt fix
1 parent 2f34353 commit 4550e6f

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/buf/fixed/plumbing/registry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ impl<T: IoBufMut> Drop for Registry<T> {
140140
// from Registry ownership, rather than deallocate.
141141
unsafe { self.buffers[i].set_init(*init_len) };
142142
}
143-
BufState::CheckedOut => {
143+
BufState::CheckedOut => {
144144
//unreachable!("all buffers must be checked in")
145145
println!("Bug");
146-
},
146+
}
147147
}
148148
}
149149

src/buf/fixed/registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use super::FixedBuf;
21
use super::plumbing;
2+
use super::FixedBuf;
33
use std::cell::RefCell;
44

55
use crate::buf::fixed::shared::{process, register, unregister};

src/runtime/driver/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ impl Driver {
187187
}
188188

189189
pub(crate) fn unregister_buffers(&mut self) -> io::Result<()> {
190-
if let Some(_) = &self.fixed_buffers.take() {
190+
if self.fixed_buffers.take().is_some() {
191191
self.uring.submitter().unregister_buffers()?;
192192
return Ok(());
193193
}

src/runtime/driver/op/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ where
3939

4040
/// Submit an operation to the driver for batched entry to the kernel.
4141
pub fn submit(self) -> Pin<Box<Op<InFlightOneshot<D, T>, OneshotCQE>>> {
42-
CONTEXT.with(|x| self.submit_with_driver(&**x.handle()))
42+
CONTEXT.with(|x| self.submit_with_driver(&x.handle()))
4343
}
4444

4545
fn submit_with_driver(

tests/fs_file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ fn assert_invalid_fd(fd: RawFd) {
345345
let mut buf = vec![];
346346

347347
match f.read_to_end(&mut buf) {
348-
Err(ref e) if e.raw_os_error() == Some(libc::EBADF) => {},
348+
Err(ref e) if e.raw_os_error() == Some(libc::EBADF) => {}
349349
res => panic!("assert_invalid_fd finds for fd {:?}, res = {:?}", fd, res),
350350
}
351351
}

0 commit comments

Comments
 (0)