Use proper match with no wildcard when detecting if it's archive

This commit is contained in:
Spyros Roum 2021-10-31 11:09:35 +02:00
parent 6b6ade8c9a
commit 604616e042

View File

@ -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,
}
}
}