mirror of
https://github.com/FliegendeWurst/ripgrep-all.git
synced 2024-11-08 14:00:37 +00:00
Run clippy
This commit is contained in:
parent
fdd4efe12e
commit
ab500733aa
@ -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("-");
|
||||||
|
@ -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?;
|
||||||
|
@ -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(())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user