Skip to content

Commit

Permalink
Clippy fixes and other minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shssoichiro committed Jul 7, 2024
1 parent 01c5781 commit 80ed19b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions av1an-core/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,7 @@ impl Av1anContext {
for arg in vspipe_args {
command.args(["-a", &arg]);
}
command.spawn()
.unwrap()
.wait()
command.status()
.unwrap()
})
})
Expand Down
2 changes: 1 addition & 1 deletion av1an-core/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ pub unsafe fn parse_aom_vpx_frames_sse41(s: &[u8]) -> Option<u64> {
let mult = _mm_set_epi16(0, 0, 0, 0, 1, 10000, 1, 10000);
chunk = _mm_madd_epi16(chunk, mult);

let chunk = transmute::<_, [u64; 2]>(chunk);
let chunk = transmute::<__m128i, [u64; 2]>(chunk);

Some(((chunk[0] & 0xffff_ffff) * 100_000_000) + (chunk[0] >> 32))
}
Expand Down
2 changes: 1 addition & 1 deletion av1an-core/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ macro_rules! inplace_vec {
idx += 1;
)*

mem::transmute::<_, Vec<Cow<_>>>(v)
mem::transmute::<Vec<MaybeUninit<Cow<_>>>, Vec<Cow<_>>>(v)
}
}};
}
Expand Down
3 changes: 1 addition & 2 deletions av1an-core/src/vmaf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::cmp::Ordering;
use std::ffi::OsStr;
use std::path::Path;
use std::process::{Command, Stdio};
use std::usize;

use anyhow::{anyhow, Context};
use plotters::prelude::*;
Expand Down Expand Up @@ -260,7 +259,7 @@ pub fn run_vmaf(
cmd.stderr(Stdio::piped());
cmd.stdout(Stdio::null());

let output = cmd.spawn().unwrap().wait_with_output().unwrap();
let output = cmd.output().unwrap();

if !output.status.success() {
return Err(Box::new(EncoderCrash {
Expand Down

0 comments on commit 80ed19b

Please sign in to comment.