mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-02-05 02:38:08 -05:00
compile and lint cleanly on latest nightly
This commit is contained in:
parent
53414ed903
commit
e4ecd0d853
4
server/Cargo.lock
generated
4
server/Cargo.lock
generated
@ -1492,9 +1492,9 @@ checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.49"
|
version = "1.0.63"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5"
|
checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
@ -195,9 +195,7 @@ unsafe impl Sync for OpenFile {}
|
|||||||
|
|
||||||
impl Drop for OpenFile {
|
impl Drop for OpenFile {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
if let Err(e) =
|
if let Err(e) = unsafe { nix::sys::mman::munmap(self.map_ptr, self.map_len) } {
|
||||||
unsafe { nix::sys::mman::munmap(self.map_ptr as *mut std::ffi::c_void, self.map_len) }
|
|
||||||
{
|
|
||||||
// This should never happen.
|
// This should never happen.
|
||||||
log::error!(
|
log::error!(
|
||||||
"unable to munmap {}, {:?} len {}: {}",
|
"unable to munmap {}, {:?} len {}: {}",
|
||||||
@ -344,7 +342,7 @@ impl ReaderInt {
|
|||||||
|
|
||||||
if let Err(e) = unsafe {
|
if let Err(e) = unsafe {
|
||||||
nix::sys::mman::madvise(
|
nix::sys::mman::madvise(
|
||||||
map_ptr as *mut libc::c_void,
|
map_ptr,
|
||||||
map_len.get(),
|
map_len.get(),
|
||||||
nix::sys::mman::MmapAdvise::MADV_SEQUENTIAL,
|
nix::sys::mman::MmapAdvise::MADV_SEQUENTIAL,
|
||||||
)
|
)
|
||||||
|
@ -139,7 +139,7 @@ pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error>
|
|||||||
.extend_from_slice(&dir_uuid.0.as_bytes()[..]);
|
.extend_from_slice(&dir_uuid.0.as_bytes()[..]);
|
||||||
match (open_id, open_uuid) {
|
match (open_id, open_uuid) {
|
||||||
(Some(id), Some(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.id = id;
|
||||||
o.uuid.extend_from_slice(&uuid.0.as_bytes()[..]);
|
o.uuid.extend_from_slice(&uuid.0.as_bytes()[..]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user