Skip to content

Commit 3d904e6

Browse files
committed
Update infer to 0.7.0
1 parent 2d3e391 commit 3d904e6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
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"

src/mime/mod.rs

Lines changed: 2 additions & 2 deletions
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)