Skip to content

Commit 2994b26

Browse files
committed
Change example to use FromStr
std::str::from_str() is deprecated
1 parent 9e3d159 commit 2994b26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ macro_rules! inspect(
5555
/// This improves things so you use match without Strings:
5656
///
5757
/// ```rust
58-
/// use std::str::from_str;
58+
/// use std::str::FromStr;
5959
/// use mime::{Mime, TopLevel, SubLevel};
6060
///
61-
/// let mime: mime::Mime = from_str("application/json").unwrap();
61+
/// let mime: mime::Mime = FromStr::from_str("application/json").unwrap();
6262
///
6363
/// match mime {
6464
/// Mime(TopLevel::Application, SubLevel::Json, _) => println!("matched json!"),

0 commit comments

Comments
 (0)