diff --git a/core/io/linux.rs b/core/io/linux.rs index 42b14b2a4..8e166f2c7 100644 --- a/core/io/linux.rs +++ b/core/io/linux.rs @@ -4,8 +4,8 @@ use libc::{c_short, fcntl, flock, iovec, F_SETLK}; use log::{debug, trace}; use nix::fcntl::{FcntlArg, OFlag}; use std::cell::RefCell; -use std::fmt; use std::collections::HashMap; +use std::fmt; use std::os::unix::io::AsRawFd; use std::rc::Rc; use thiserror::Error; @@ -38,7 +38,7 @@ struct WrappedIOUring { ring: io_uring::IoUring, pending_ops: usize, pub pending: HashMap>, - key: u64 + key: u64, } struct InnerLinuxIO { @@ -55,7 +55,7 @@ impl LinuxIO { ring, pending_ops: 0, pending: HashMap::new(), - key: 0 + key: 0, }, iovecs: [iovec { iov_base: std::ptr::null_mut(), @@ -111,7 +111,7 @@ impl WrappedIOUring { } fn get_key(&mut self) -> u64 { - self.key +=1; + self.key += 1; self.key } } @@ -155,8 +155,9 @@ impl IO for LinuxIO { let result = cqe.result(); if result < 0 { return Err(LimboError::LinuxIOError(format!( - "{}", - LinuxIOError::IOUringCQError(result) + "{} cqe: {:?}", + LinuxIOError::IOUringCQError(result), + cqe ))); } { @@ -184,7 +185,6 @@ pub struct LinuxFile { file: std::fs::File, } - impl File for LinuxFile { fn lock_file(&self, exclusive: bool) -> Result<()> { let fd = self.file.as_raw_fd(); @@ -258,7 +258,6 @@ impl File for LinuxFile { Ok(()) } - fn pwrite( &self, pos: usize, diff --git a/core/storage/btree.rs b/core/storage/btree.rs index 732c8f1da..39dfed357 100644 --- a/core/storage/btree.rs +++ b/core/storage/btree.rs @@ -334,7 +334,6 @@ impl BTreeCursor { }; return Ok(CursorResult::Ok((Some(rowid), Some(record)))); } else { - } } cell_type => { @@ -548,7 +547,6 @@ impl BTreeCursor { found_cell = true; break; } else { - } } BTreeCell::TableLeafCell(TableLeafCell {