diff --git a/src/adapters/ffmpeg.rs b/src/adapters/ffmpeg.rs index b18b666..2ed3612 100644 --- a/src/adapters/ffmpeg.rs +++ b/src/adapters/ffmpeg.rs @@ -134,7 +134,7 @@ impl WritingFileAdapter for FFmpegAdapter { return Err(format_err!("ffprobe failed: {:?}", exit)); } } - if subtitle_streams.len() > 0 { + if !subtitle_streams.is_empty() { for probe_stream in subtitle_streams.iter() { // extract subtitles let mut cmd = Command::new("ffmpeg"); @@ -143,7 +143,7 @@ impl WritingFileAdapter for FFmpegAdapter { .arg("-i") .arg(&inp_fname) .arg("-map") - .arg(format!("0:{}", probe_stream.index.to_string())) // 0 for first input + .arg(format!("0:{}", probe_stream.index)) // 0 for first input .arg("-f") .arg("webvtt") .arg("-"); diff --git a/src/adapters/sqlite.rs b/src/adapters/sqlite.rs index 826d091..dba24a4 100644 --- a/src/adapters/sqlite.rs +++ b/src/adapters/sqlite.rs @@ -138,7 +138,7 @@ mod test { #[tokio::test] async fn simple() -> Result<()> { - let adapter: Box = Box::new(SqliteAdapter::default()); + let adapter: Box = Box::::default(); let fname = test_data_dir().join("hello.sqlite3"); let (a, d) = simple_fs_adapt_info(&fname).await?; let res = adapter.adapt(a, &d).await?; diff --git a/src/preproc_cache.rs b/src/preproc_cache.rs index f361792..d0eed0e 100644 --- a/src/preproc_cache.rs +++ b/src/preproc_cache.rs @@ -181,7 +181,7 @@ mod test { #[tokio::test] async fn test_read_write() -> anyhow::Result<()> { let path = tempfile::tempdir()?; - let db = open_cache_db(&path.path().join("foo.sqlite3")).await?; + let _db = open_cache_db(&path.path().join("foo.sqlite3")).await?; // db.set(); Ok(()) }