address some no-op clippy warnings

This commit is contained in:
Scott Lamb
2021-05-17 14:31:50 -07:00
parent 603f02b686
commit 54bd068706
32 changed files with 185 additions and 241 deletions

View File

@@ -22,8 +22,7 @@ mod v3_to_v4;
mod v4_to_v5;
mod v5_to_v6;
const UPGRADE_NOTES: &'static str =
concat!("upgraded using moonfire-db ", env!("CARGO_PKG_VERSION"));
const UPGRADE_NOTES: &str = concat!("upgraded using moonfire-db ", env!("CARGO_PKG_VERSION"));
#[derive(Debug)]
pub struct Args<'a> {

View File

@@ -99,7 +99,7 @@ struct CameraState {
}
fn has_trailing_zero(video_index: &[u8]) -> Result<bool, Error> {
let mut it = recording::SampleIndexIterator::new();
let mut it = recording::SampleIndexIterator::default();
while it.next(video_index)? {}
Ok(it.duration_90k == 0)
}

View File

@@ -77,7 +77,7 @@ pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error>
if e == nix::Error::Sys(nix::errno::Errno::ENOENT) {
continue; // assume it was already moved.
}
Err(e)?;
return Err(e.into());
}
}