mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2025-03-04 23:07:20 +00:00
Make PictureType
and Mp4Codec
non-exhaustive
This commit is contained in:
parent
38a286cc6e
commit
2ccb38a97d
2 changed files with 4 additions and 2 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue