compile and lint cleanly on latest nightly

This commit is contained in:
Scott Lamb 2023-07-04 10:57:21 -07:00
parent 53414ed903
commit e4ecd0d853
3 changed files with 5 additions and 7 deletions

4
server/Cargo.lock generated
View File

@ -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",
]

View File

@ -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,
)

View File

@ -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()[..]);
}