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 43deab7 commit b53f171
Showing 1 changed file with 14 additions and 85 deletions.
99 changes: 14 additions & 85 deletions src/adapters/custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,103 +50,32 @@ impl Default for CustomIdentifiers {
fn default() -> CustomIdentifiers {
CustomIdentifiers {
ffmpeg: CustomIdentifier {
extensions: Some(
ffmpeg::EXTENSIONS
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
mimetypes: Some(
ffmpeg::MIMETYPES
.to_vec()
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
extensions: Some(strs(ffmpeg::EXTENSIONS)),
mimetypes: Some(strs(ffmpeg::MIMETYPES)),
},
gz: CustomIdentifier {
extensions: Some(
decompress::EXTENSIONS_GZ
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
mimetypes: Some(
decompress::MIMETYPES_GZ
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
extensions: Some(strs(decompress::EXTENSIONS_GZ)),
mimetypes: Some(strs(decompress::MIMETYPES_GZ)),
},
bz2: CustomIdentifier {
extensions: Some(
decompress::EXTENSIONS_BZ2
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
mimetypes: Some(
decompress::MIMETYPES_BZ2
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
extensions: Some(strs(decompress::EXTENSIONS_BZ2)),
mimetypes: Some(strs(decompress::MIMETYPES_BZ2)),
},
xz: CustomIdentifier {
extensions: Some(
decompress::EXTENSIONS_XZ
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
mimetypes: Some(
decompress::MIMETYPES_XZ
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
extensions: Some(strs(decompress::EXTENSIONS_XZ)),
mimetypes: Some(strs(decompress::MIMETYPES_XZ)),
},
zst: CustomIdentifier {
extensions: Some(
decompress::EXTENSIONS_ZST
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
mimetypes: Some(
decompress::MIMETYPES_ZST
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
extensions: Some(strs(decompress::EXTENSIONS_ZST)),
mimetypes: Some(strs(decompress::MIMETYPES_ZST)),
},
zip: CustomIdentifier {
extensions: Some(
zip::EXTENSIONS
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
mimetypes: Some(
zip::MIMETYPES
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
extensions: Some(strs(zip::EXTENSIONS)),
mimetypes: Some(strs(zip::MIMETYPES)),
},
mbox: CustomIdentifier {
extensions: Some(
mbox::EXTENSIONS
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
mimetypes: Some(
mbox::MIMETYPES
.iter()
.map(|&s| s.to_string())
.collect::<Vec<String>>(),
),
extensions: Some(strs(mbox::EXTENSIONS)),
mimetypes: Some(strs(mbox::MIMETYPES)),
},
}
}
Expand Down

0 comments on commit b53f171

Please sign in to comment.