Skip to content

Commit 74db30a

Browse files
committed
boulder/draft: Remove infer usage
Since 7d814ca, we just bsdtar for both tar and zip archives. There is no longer any need to infer the type.
1 parent ba831c8 commit 74db30a

File tree

4 files changed

+0
-39
lines changed

4 files changed

+0
-39
lines changed

Cargo.lock

Lines changed: 0 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ xxhash-rust = { version = "0.8.11", features = ["xxh3"] }
9292
zstd = { version = "0.13.2", features = ["zstdmt"] }
9393
mailparse = "0.16.1"
9494
zbus = { version = "5.1.1", default-features = false, features = ["tokio"] }
95-
infer = "0.19.0"
9695
tempfile = "3.20.0"
9796
kdl = "6.5.0"
9897
libc = "0.2.62"

boulder/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ thread-priority.workspace = true
4545
tokio.workspace = true
4646
url.workspace = true
4747
mailparse.workspace = true
48-
infer.workspace = true
4948
walkdir = "2.5.0"
5049
zstd.workspace = true
5150
astr.workspace = true

boulder/src/draft/upstream.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,6 @@ async fn fetch(url: &Url, output: &Path) -> Result<String, Error> {
8484
}
8585

8686
async fn extract(archive: &Path, destination: &Path) -> Result<(), Error> {
87-
let infer_result = infer::get_from_path(archive).map_err(|source| Error::InferFileType {
88-
path: archive.to_owned(),
89-
source,
90-
})?;
91-
if let Some(kind) = infer_result {
92-
println!("Detected type: {} ({})", kind.mime_type(), kind.extension());
93-
} else {
94-
println!("Unknown file type, attempting tar extraction");
95-
}
96-
9787
let result = Command::new("bsdtar")
9888
.arg("xf")
9989
.arg(archive)

0 commit comments

Comments
 (0)