diff --git a/server/Cargo.lock b/server/Cargo.lock index bac0b20..e31c994 100644 --- a/server/Cargo.lock +++ b/server/Cargo.lock @@ -1492,9 +1492,9 @@ checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" [[package]] name = "proc-macro2" -version = "1.0.49" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" +checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" dependencies = [ "unicode-ident", ] diff --git a/server/db/dir/reader.rs b/server/db/dir/reader.rs index a6d55ed..7fbc87b 100644 --- a/server/db/dir/reader.rs +++ b/server/db/dir/reader.rs @@ -195,9 +195,7 @@ unsafe impl Sync for OpenFile {} impl Drop for OpenFile { fn drop(&mut self) { - if let Err(e) = - unsafe { nix::sys::mman::munmap(self.map_ptr as *mut std::ffi::c_void, self.map_len) } - { + if let Err(e) = unsafe { nix::sys::mman::munmap(self.map_ptr, self.map_len) } { // This should never happen. log::error!( "unable to munmap {}, {:?} len {}: {}", @@ -344,7 +342,7 @@ impl ReaderInt { if let Err(e) = unsafe { nix::sys::mman::madvise( - map_ptr as *mut libc::c_void, + map_ptr, map_len.get(), nix::sys::mman::MmapAdvise::MADV_SEQUENTIAL, ) diff --git a/server/db/upgrade/v4_to_v5.rs b/server/db/upgrade/v4_to_v5.rs index d74fe8e..95dad30 100644 --- a/server/db/upgrade/v4_to_v5.rs +++ b/server/db/upgrade/v4_to_v5.rs @@ -139,7 +139,7 @@ pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error> .extend_from_slice(&dir_uuid.0.as_bytes()[..]); match (open_id, open_uuid) { (Some(id), Some(uuid)) => { - let mut o = db_meta.last_complete_open.mut_or_insert_default(); + let o = db_meta.last_complete_open.mut_or_insert_default(); o.id = id; o.uuid.extend_from_slice(&uuid.0.as_bytes()[..]); }