Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
philn committed Mar 22, 2024
1 parent 7a0a7a2 commit 73fa84a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dav1d-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ mod build {
runner!("meson", "install", "-C", build_path.to_str().unwrap());

let pkg_dir = build_path.join("meson-private");
system_deps::Library::from_internal_pkg_config(&pkg_dir, lib, TAG)
system_deps::Library::from_internal_pkg_config(pkg_dir, lib, TAG)
}
}

Expand Down
15 changes: 6 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,15 @@ bitflags::bitflags! {
}
}

#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
pub enum DecodeFrameType {
#[default]
All,
Reference,
Intra,
Key,
}

impl Default for DecodeFrameType {
fn default() -> Self {
DecodeFrameType::All
}
}

impl TryFrom<u32> for DecodeFrameType {
type Error = TryFromEnumError;

Expand Down Expand Up @@ -418,6 +413,8 @@ impl Decoder {
} else {
let inner = InnerPicture { pic };
Ok(Picture {
// https://github.com/rust-av/dav1d-rs/issues/95
#[allow(clippy::arc_with_non_send_sync)]
inner: Arc::new(inner),
})
}
Expand Down Expand Up @@ -561,7 +558,7 @@ impl Picture {
PixelLayout::I400 | PixelLayout::I422 | PixelLayout::I444 => self.height(),
},
};
(self.stride(component) as u32, height)
(self.stride(component), height)
}

/// Plane data of the `component` for the decoded frame.
Expand Down Expand Up @@ -631,7 +628,7 @@ impl Picture {
/// This is the same duration as the one provided to [`Decoder::send_data`] or `0` if none was
/// provided.
pub fn duration(&self) -> i64 {
self.inner.pic.m.duration as i64
self.inner.pic.m.duration
}

/// Offset of the frame.
Expand Down

0 comments on commit 73fa84a

Please sign in to comment.