Fix clippy warnings (#639)
This commit is contained in:
parent
22281844bb
commit
dfdc2c6703
|
@ -20,7 +20,7 @@ const NULL: &str = if cfg!(windows) { "nul" } else { "/dev/null" };
|
|||
|
||||
#[allow(non_camel_case_types)]
|
||||
#[derive(
|
||||
Clone, Copy, PartialEq, Serialize, Deserialize, Debug, strum::EnumString, strum::IntoStaticStr,
|
||||
Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Debug, strum::EnumString, strum::IntoStaticStr,
|
||||
)]
|
||||
pub enum Encoder {
|
||||
aom,
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#![allow(clippy::drop_ref)]
|
||||
#![allow(clippy::unsafe_derive_deserialize)]
|
||||
#![allow(clippy::needless_pass_by_value)]
|
||||
#![allow(clippy::use_self)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
@ -364,7 +365,7 @@ fn save_chunk_queue(temp: &str, chunk_queue: &[Chunk]) -> anyhow::Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Verbosity {
|
||||
Verbose,
|
||||
Normal,
|
||||
|
|
|
@ -1347,10 +1347,7 @@ properly into a mkv file. Specify mkvmerge as the concatenation method by settin
|
|||
self.vmaf_path.as_deref(),
|
||||
self.vmaf_res.as_str(),
|
||||
1,
|
||||
match self.vmaf_filter.as_deref() {
|
||||
Some(filter) => Some(filter),
|
||||
None => None,
|
||||
},
|
||||
self.vmaf_filter.as_deref(),
|
||||
self.vmaf_threads.unwrap_or_else(|| {
|
||||
available_parallelism()
|
||||
.expect("Unrecoverable: Failed to get thread count")
|
||||
|
|
|
@ -6,9 +6,9 @@ use std::path::{Path, PathBuf};
|
|||
#[macro_export]
|
||||
macro_rules! count {
|
||||
() => (0_usize);
|
||||
($x:tt, $($xs:tt),*) => (1_usize + crate::count!($($xs)*));
|
||||
($x:tt, $($xs:tt)*) => (1_usize + crate::count!($($xs)*));
|
||||
($x:tt $($xs:tt)*) => (1_usize + crate::count!($($xs)*));
|
||||
($x:tt, $($xs:tt),*) => (1_usize + $crate::count!($($xs)*));
|
||||
($x:tt, $($xs:tt)*) => (1_usize + $crate::count!($($xs)*));
|
||||
($x:tt $($xs:tt)*) => (1_usize + $crate::count!($($xs)*));
|
||||
}
|
||||
|
||||
/// Equivalent to `into_vec!` when the inferred type is `Cow<'_, str>`.
|
||||
|
@ -26,7 +26,7 @@ macro_rules! inplace_vec {
|
|||
use std::mem::{self, MaybeUninit};
|
||||
use std::borrow::Cow;
|
||||
|
||||
const SIZE: usize = crate::count!($($x)*);
|
||||
const SIZE: usize = $crate::count!($($x)*);
|
||||
#[allow(unused_assignments)]
|
||||
#[allow(clippy::transmute_undefined_repr)]
|
||||
unsafe {
|
||||
|
|
|
@ -203,7 +203,7 @@ pub fn run_vmaf(
|
|||
)
|
||||
};
|
||||
|
||||
let mut source_pipe = if let [cmd, args @ ..] = &*reference_pipe_cmd {
|
||||
let mut source_pipe = if let [cmd, args @ ..] = reference_pipe_cmd {
|
||||
let mut source_pipe = Command::new(cmd);
|
||||
source_pipe.args(args);
|
||||
source_pipe.stdout(Stdio::piped());
|
||||
|
|
Loading…
Reference in a new issue