Run clippy

This commit is contained in:
Joseph LaFreniere 2023-06-19 22:25:57 -05:00
parent fdd4efe12e
commit ab500733aa
No known key found for this signature in database
GPG Key ID: EE236AA0141EFCA3
3 changed files with 4 additions and 4 deletions

View File

@ -134,7 +134,7 @@ impl WritingFileAdapter for FFmpegAdapter {
return Err(format_err!("ffprobe failed: {:?}", exit)); return Err(format_err!("ffprobe failed: {:?}", exit));
} }
} }
if subtitle_streams.len() > 0 { if !subtitle_streams.is_empty() {
for probe_stream in subtitle_streams.iter() { for probe_stream in subtitle_streams.iter() {
// extract subtitles // extract subtitles
let mut cmd = Command::new("ffmpeg"); let mut cmd = Command::new("ffmpeg");
@ -143,7 +143,7 @@ impl WritingFileAdapter for FFmpegAdapter {
.arg("-i") .arg("-i")
.arg(&inp_fname) .arg(&inp_fname)
.arg("-map") .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("-f")
.arg("webvtt") .arg("webvtt")
.arg("-"); .arg("-");

View File

@ -138,7 +138,7 @@ mod test {
#[tokio::test] #[tokio::test]
async fn simple() -> Result<()> { async fn simple() -> Result<()> {
let adapter: Box<dyn FileAdapter> = Box::new(SqliteAdapter::default()); let adapter: Box<dyn FileAdapter> = Box::<SqliteAdapter>::default();
let fname = test_data_dir().join("hello.sqlite3"); let fname = test_data_dir().join("hello.sqlite3");
let (a, d) = simple_fs_adapt_info(&fname).await?; let (a, d) = simple_fs_adapt_info(&fname).await?;
let res = adapter.adapt(a, &d).await?; let res = adapter.adapt(a, &d).await?;

View File

@ -181,7 +181,7 @@ mod test {
#[tokio::test] #[tokio::test]
async fn test_read_write() -> anyhow::Result<()> { async fn test_read_write() -> anyhow::Result<()> {
let path = tempfile::tempdir()?; 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(); // db.set();
Ok(()) Ok(())
} }