Skip to content

Commit 0b60560

Browse files
authored
Merge pull request #397 from janbaudisch/update-infer
Update infer to 0.7.0
2 parents 2d3e391 + 3d904e6 commit 0b60560

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fastrand = "1.4.0"
3131
base64 = "0.13.0"
3232
futures-lite = "1.11.1"
3333
async-channel = "1.5.1"
34-
infer = "0.2.3"
34+
infer = "0.7.0"
3535
pin-project-lite = "0.2.0"
3636
url = "2.1.1"
3737
anyhow = "1.0.26"

Diff for: src/mime/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ impl Mime {
4444
pub fn sniff(bytes: &[u8]) -> crate::Result<Self> {
4545
let info = Infer::new();
4646
let mime = match info.get(bytes) {
47-
Some(info) => info.mime,
47+
Some(info) => info.mime_type(),
4848
None => crate::bail!("Could not sniff the mime type"),
4949
};
50-
Mime::from_str(&mime)
50+
Mime::from_str(mime)
5151
}
5252

5353
/// Guess the mime type from a file extension

0 commit comments

Comments
 (0)