Skip to content

Commit

Permalink
fixup! Make built-in adapters' identifiers configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrenierejm committed Sep 4, 2024
1 parent b571372 commit d2d3004
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/adapters/decompress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> =
// [EXTENSIONS_GZ, EXTENSIONS_BZ2, EXTENSIONS_XZ, EXTENSIONS_ZST].concat();

#[derive(Debug, PartialEq, Eq)]
struct DecompressError;
Expand Down Expand Up @@ -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 {
Expand All @@ -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<String>,
Expand Down

0 comments on commit d2d3004

Please sign in to comment.