mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 03:55:28 +00:00
Use proper match
with no wildcard when detecting if it's archive
This commit is contained in:
parent
6b6ade8c9a
commit
604616e042
@ -17,7 +17,14 @@ pub enum CompressionFormat {
|
||||
|
||||
impl CompressionFormat {
|
||||
pub fn is_archive_format(&self) -> bool {
|
||||
matches!(self, Tar | Zip)
|
||||
// Keep this match like that without a wildcard `_` so we don't forget to update it
|
||||
match self {
|
||||
Tar | Zip => true,
|
||||
Gzip => false,
|
||||
Bzip => false,
|
||||
Lzma => false,
|
||||
Zstd => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user