mirror of
https://github.com/mainmatter/100-exercises-to-learn-rust
synced 2024-12-25 21:58:26 +01:00
Fix a typo (#116)
This commit is contained in:
parent
f272843c61
commit
9a2086081c
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ let title = String::from("A title");
|
||||||
|
|
||||||
We've been primarily using `.into()`, though.\
|
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)
|
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**.\
|
`From` and `Into` are **dual traits**.\
|
||||||
In particular, `Into` is implemented for any type that implements `From` using a **blanket implementation**:
|
In particular, `Into` is implemented for any type that implements `From` using a **blanket implementation**:
|
||||||
|
|
Loading…
Reference in a new issue