Skip to content

Commit

Permalink
Remove .ext from FileType
Browse files Browse the repository at this point in the history
Co-authored-by: Alex <[email protected]>
  • Loading branch information
giraffekey and Serial-ATA committed Feb 23, 2025
1 parent 1ba0b17 commit a438022
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions lofty/src/file/file_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,33 +99,6 @@ impl FileType {
}
}

/// Returns the extension for the `FileType` if it is known
///
/// # Examples
///
/// ```rust
/// use lofty::file::FileType;
///
/// assert_eq!(FileType::Mpeg.ext(), Some("mp3"));
/// ```
pub fn ext(&self) -> Option<&str> {
match self {
FileType::Aac => Some("aac"),
FileType::Aiff => Some("aiff"),
FileType::Ape => Some("ape"),
FileType::Flac => Some("flac"),
FileType::Mpeg => Some("mp3"),
FileType::Mp4 => Some("mp4"),
FileType::Mpc => Some("mpc"),
FileType::Opus => Some("opus"),
FileType::Vorbis => Some("ogg"),
FileType::Speex => Some("spx"),
FileType::Wav => Some("wav"),
FileType::WavPack => Some("wv"),
FileType::Custom(_) => None,
}
}

/// Attempts to extract a [`FileType`] from an extension
///
/// # Examples
Expand Down

0 comments on commit a438022

Please sign in to comment.