diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-05-14 13:08:05 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-05-14 13:08:05 +0200 |
commit | e243ceb4d694cc08767ad70027bb6963f4cefea3 (patch) | |
tree | aff7ef58ee740515e89a7dbf66acf0456110b4a3 /nihav-core/src/codecs/mod.rs | |
parent | 250c49f64633580d3e294a7b871fad4618694209 (diff) | |
download | nihav-e243ceb4d694cc08767ad70027bb6963f4cefea3.tar.gz |
core: fix most clippy warnings
Diffstat (limited to 'nihav-core/src/codecs/mod.rs')
-rw-r--r-- | nihav-core/src/codecs/mod.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/nihav-core/src/codecs/mod.rs b/nihav-core/src/codecs/mod.rs index 4ea379d..311a45e 100644 --- a/nihav-core/src/codecs/mod.rs +++ b/nihav-core/src/codecs/mod.rs @@ -168,8 +168,10 @@ pub struct MV { pub y: i16, } +#[allow(clippy::many_single_char_names)] +#[allow(clippy::collapsible_if)] impl MV { - pub fn new(x: i16, y: i16) -> Self { MV{ x: x, y: y } } + pub fn new(x: i16, y: i16) -> Self { MV{ x, y } } pub fn pred(a: MV, b: MV, c: MV) -> Self { let x; if a.x < b.x { @@ -199,7 +201,7 @@ impl MV { y = b.y; } } - MV { x: x, y: y } + MV { x, y } } } @@ -245,6 +247,10 @@ impl NADecoderSupport { } } +impl Default for NADecoderSupport { + fn default() -> Self { Self::new() } +} + pub trait NADecoder { fn init(&mut self, supp: &mut NADecoderSupport, info: NACodecInfoRef) -> DecoderResult<()>; @@ -263,6 +269,7 @@ pub mod blockdsp; #[cfg(feature="h263")] pub mod h263; +#[derive(Default)] pub struct RegisteredDecoders { decs: Vec<DecoderInfo>, } |