projects
/
rust_exercises.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f272843
)
Fix a typo (#116)
author
Zhang Zihao
<296311907@qq.com>
Wed, 17 Jul 2024 06:08:22 +0000
(14:08 +0800)
committer
GitHub
<noreply@github.com>
Wed, 17 Jul 2024 06:08:22 +0000
(08:08 +0200)
book/src/04_traits/09_from.md
patch
|
blob
|
history
diff --git
a/book/src/04_traits/09_from.md
b/book/src/04_traits/09_from.md
index
2d5dd67
..
3006dba
100644
(file)
--- a/
book/src/04_traits/09_from.md
+++ b/
book/src/04_traits/09_from.md
@@
-108,7
+108,7
@@
let title = String::from("A title");
We've been primarily using `.into()`, though.\
If you check out the [implementors of `Into`](https://doc.rust-lang.org/std/convert/trait.Into.html#implementors)
-you won't find `Into<
&str> for String
`. What's going on?
+you won't find `Into<
String> for &str
`. What's going on?
`From` and `Into` are **dual traits**.\
In particular, `Into` is implemented for any type that implements `From` using a **blanket implementation**: