Make PictureType and Mp4Codec non-exhaustive

This commit is contained in:
Serial 2022-02-13 20:32:55 -05:00
parent 38a286cc6e
commit 2ccb38a97d
No known key found for this signature in database
GPG key ID: DA95198DC17C4568
2 changed files with 4 additions and 2 deletions

View file

@ -13,6 +13,7 @@ use byteorder::{BigEndian, ReadBytesExt};
#[allow(missing_docs)]
#[derive(Debug, Clone, PartialEq)]
#[non_exhaustive]
/// An MP4 file's audio codec
pub enum Mp4Codec {
AAC,

View file

@ -115,6 +115,7 @@ impl MimeType {
/// The picture type, according to ID3v2 APIC
#[allow(missing_docs)]
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)]
#[non_exhaustive]
pub enum PictureType {
Other,
Icon,
@ -174,8 +175,8 @@ impl PictureType {
#[cfg(any(feature = "id3v2", feature = "vorbis_comments"))]
/// Get a `PictureType` from a u8 according to ID3v2 APIC
pub fn from_u8(bytes: u8) -> Self {
match bytes {
pub fn from_u8(byte: u8) -> Self {
match byte {
0 => Self::Other,
1 => Self::Icon,
2 => Self::OtherIcon,