diff options
| author | Hegui Dai <natural_selection_@outlook.com> | 2025-04-24 10:31:53 +0800 |
|---|---|---|
| committer | Hegui Dai <natural_selection_@outlook.com> | 2025-04-24 10:31:53 +0800 |
| commit | 3a14991e77b890c6971e9d02e83d25bc281f2a70 (patch) | |
| tree | d925571c4f0e65dd0e9147fc0c3309a62825f45d | |
| parent | 56d5efc68c66c144d41a792a6f55db74a737ad56 (diff) | |
| download | rust-3a14991e77b890c6971e9d02e83d25bc281f2a70.tar.gz rust-3a14991e77b890c6971e9d02e83d25bc281f2a70.zip | |
fix example
| -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); /// ``` |
