diff --git a/src/adapters/decompress.rs b/src/adapters/decompress.rs index 07e7e1c..83d8554 100644 --- a/src/adapters/decompress.rs +++ b/src/adapters/decompress.rs @@ -11,8 +11,6 @@ pub const EXTENSIONS_GZ: &[&str] = &["als", "gz", "tgz"]; pub const EXTENSIONS_BZ2: &[&str] = &["bz2", "tbz", "tbz2"]; pub const EXTENSIONS_XZ: &[&str] = &["xz"]; pub const EXTENSIONS_ZST: &[&str] = &["zst"]; -// pub static EXTENSIONS: Vec = -// [EXTENSIONS_GZ, EXTENSIONS_BZ2, EXTENSIONS_XZ, EXTENSIONS_ZST].concat(); #[derive(Debug, PartialEq, Eq)] struct DecompressError; @@ -46,7 +44,6 @@ pub const MIMETYPES_GZ: &[&str] = &["application/gzip"]; pub const MIMETYPES_BZ2: &[&str] = &["application/x-bzip"]; pub const MIMETYPES_XZ: &[&str] = &["application/x-xz"]; pub const MIMETYPES_ZST: &[&str] = &["application/zstd"]; -// pub const MIMES: &[&str] = [MIMES_GZ, MIMES_BZ2, MIMES_XZ, MIMES_ZST].concat(); #[derive(Debug, PartialEq)] enum Mime { @@ -73,26 +70,6 @@ impl FromStr for Mime { } } -// static EXTENSIONS_GZ: HashSet<&str> = ["als", "gz", "tgz"].into(); -// static EXTENSIONS_XZ: HashSet<&str> = ["xz"].into(); -// static EXTENSIONS_ZST: HashSet<&str> = ["zst"].into(); -// pub static EXTENSIONS: HashSet<&str> = -// [EXTENSIONS_GZ, EXTENSIONS_BZ2, EXTENSIONS_XZ, EXTENSIONS_ZST] -// .iter() -// .cloned() -// .reduce(|acc, e| acc.union(&e).cloned().collect()) -// .unwrap_or_default(); - -// static MIMETYPES_GZ: HashSet<&str> = ["application/gzip"].into(); -// static MIMETYPES_BZ2: HashSet<&str> = ["application/x-bzip"].into(); -// static MIMETYPES_XZ: HashSet<&str> = ["application/x-xz"].into(); -// static MIMTEYPTES_ZST: HashSet<&str> = ["application/zstd"].into(); -// pub static MIMETYPES: HashSet<&str> = [MIMETYPES_GZ, MIMETYPES_BZ2, MIMETYPES_XZ, MIMTEYPTES_ZST] -// .iter() -// .cloned() -// .reduce(|acc, e| acc.union(&e).cloned().collect()) -// .unwrap_or_default(); - #[derive(Default)] pub struct DecompressAdapter { pub extensions_gz: Vec,