refactor: listen to clippy a lil
This commit is contained in:
parent
d86c6b191e
commit
70b6b326f1
2 changed files with 63 additions and 48 deletions
|
|
@ -59,6 +59,21 @@ pub enum ReadFilter {
|
|||
Zstd
|
||||
}
|
||||
|
||||
impl ReadFilter {
|
||||
// Returns the associated file extension for the filter, if known
|
||||
pub fn extension(&self) -> Option<&str> {
|
||||
match self {
|
||||
ReadFilter::None => Some(""),
|
||||
ReadFilter::Gzip => Some(".gz"),
|
||||
ReadFilter::Bzip2 => Some(".bz2"),
|
||||
ReadFilter::Lzma => Some(".lzma"),
|
||||
ReadFilter::Xz => Some(".xz"),
|
||||
ReadFilter::Zstd => Some(".zstd"),
|
||||
_ => None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub enum WriteFormat {
|
||||
SevenZip,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue