Release v0.2.1
This commit is contained in:
parent
ffa8bc93ba
commit
048df6355e
10 changed files with 1467 additions and 254 deletions
|
|
@ -15,10 +15,6 @@ impl EntryKind {
|
|||
pub fn is_viewable(self) -> bool {
|
||||
matches!(self, Self::ZipArchive | Self::Image | Self::Video)
|
||||
}
|
||||
|
||||
pub fn is_media(self) -> bool {
|
||||
matches!(self, Self::Image | Self::Video)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
@ -229,10 +225,6 @@ mod tests {
|
|||
assert_eq!(classify_file(Path::new("movie.MP4")), EntryKind::Video);
|
||||
assert_eq!(classify_file(Path::new("movie.mkv")), EntryKind::Video);
|
||||
assert_eq!(classify_file(Path::new("notes.txt")), EntryKind::OtherFile);
|
||||
assert!(EntryKind::Image.is_media());
|
||||
assert!(EntryKind::Video.is_media());
|
||||
assert!(!EntryKind::ZipArchive.is_media());
|
||||
assert!(!EntryKind::OtherFile.is_media());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue