diff options
| -rw-r--r-- | library/core/src/result.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/result.rs b/library/core/src/result.rs index ae6afb30f1e..98369857933 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -648,7 +648,7 @@ impl<T, E> Result<T, E> { /// let x: Result<u32, Error> = Ok(123); /// assert_eq!(x.is_err_and(|x| x.kind() == ErrorKind::NotFound), false); /// - /// let x: Result<u32, &str> = Err("ownership"); + /// let x: Result<u32, String> = Err("ownership".to_string()); /// assert_eq!(x.as_ref().is_err_and(|x| x.len() > 1), true); /// println!("still alive {:?}", x); /// ``` |
