Skip to content

Commit 3a14991

Browse files
fix example
1 parent 56d5efc commit 3a14991

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/result.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ impl<T, E> Result<T, E> {
648648
/// let x: Result<u32, Error> = Ok(123);
649649
/// assert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false);
650650
///
651-
/// let x: Result<u32, &str> = Err("ownership");
651+
/// let x: Result<u32, String> = Err("ownership".to_string());
652652
/// assert_eq!(x.as_ref().is_err_and(|x| x.len() > 1), true);
653653
/// println!("still alive {:?}", x);
654654
/// ```

0 commit comments

Comments
 (0)