Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski authored and lu-zero committed Oct 9, 2023
1 parent 5f66282 commit 5a1c725
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/api/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ fn send_test_frame<T: Pixel>(ctx: &mut Context<T>, content_value: T) {
fn get_frame_invariants<T: Pixel>(
ctx: Context<T>,
) -> impl Iterator<Item = Option<FrameInvariants<T>>> {
ctx.inner.frame_data.into_iter().map(|(_, v)| v.map(|v| v.fi))
ctx.inner.frame_data.into_values().map(|v| v.map(|v| v.fi))
}

#[interpolate_test(0, 0)]
Expand Down
2 changes: 1 addition & 1 deletion src/asm/shared/transform/inverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ pub mod test {
for sub_h in 0..sub_h_iterations {
let mut src_storage = [T::zero(); 64 * 64];
let src = &mut src_storage[..tx_size.area()];
let mut dst = Plane::from_slice(&vec![T::zero(); 64 * 64], 64);
let mut dst = Plane::from_slice(&[T::zero(); 64 * 64], 64);
// SAFETY: We write to the array below before reading from it.
let mut res_storage: Aligned<[i16; 64 * 64]> =
unsafe { Aligned::uninitialized() };
Expand Down
1 change: 0 additions & 1 deletion src/me.rs
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,6 @@ fn full_pixel_me<T: Pixel>(
}

{
let ssdec = ssdec;
let range_x = (192 * fi.me_range_scale as isize) >> ssdec;
let range_y = (64 * fi.me_range_scale as isize) >> ssdec;
let x_lo = po.x + (-range_x).max(mvx_min / 8);
Expand Down
10 changes: 5 additions & 5 deletions tests/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mod binary {
use std::path::{Path, PathBuf};

fn get_y4m_input() -> Vec<u8> {
let mut input = File::open(&format!(
let mut input = File::open(format!(
"{}/tests/small_input.y4m",
env!("CARGO_MANIFEST_DIR")
))
Expand Down Expand Up @@ -45,7 +45,7 @@ mod binary {

fn get_common_cmd(outfile: &Path) -> Command {
let mut cmd = get_rav1e_command();
cmd.args(&["--bitrate", "1000"]).arg("-o").arg(outfile).arg("-y");
cmd.args(["--bitrate", "1000"]).arg("-o").arg(outfile).arg("-y");
cmd
}

Expand All @@ -54,7 +54,7 @@ mod binary {
let outfile = get_tempfile_path("ivf");

get_rav1e_command()
.args(&["--quantizer", "100"])
.args(["--quantizer", "100"])
.arg("-o")
.arg(&outfile)
.arg("-")
Expand Down Expand Up @@ -101,7 +101,7 @@ mod binary {
let passfile = get_tempfile_path("pass");

get_common_cmd(&outfile)
.args(&["--reservoir-frame-delay", "14"])
.args(["--reservoir-frame-delay", "14"])
.arg("--first-pass")
.arg(&passfile)
.arg("-")
Expand All @@ -110,7 +110,7 @@ mod binary {
.success();

get_common_cmd(&outfile)
.args(&["--reservoir-frame-delay", "14"])
.args(["--reservoir-frame-delay", "14"])
.arg("--second-pass")
.arg(&passfile)
.arg("-")
Expand Down

0 comments on commit 5a1c725

Please sign in to comment.