mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-25 23:04:17 -05:00
improve hint for strings2, #1407
This commit is contained in:
parent
7f1754ecc5
commit
ec86b60e70
1 changed files with 3 additions and 1 deletions
|
@ -439,7 +439,9 @@ mode = "compile"
|
||||||
hint = """
|
hint = """
|
||||||
Yes, it would be really easy to fix this by just changing the value bound to `word` to be a
|
Yes, it would be really easy to fix this by just changing the value bound to `word` to be a
|
||||||
string slice instead of a `String`, wouldn't it?? There is a way to add one character to line
|
string slice instead of a `String`, wouldn't it?? There is a way to add one character to line
|
||||||
9, though, that will coerce the `String` into a string slice."""
|
9, though, that will coerce the `String` into a string slice.
|
||||||
|
|
||||||
|
Side note: If you're interested in learning about how this kind of reference conversion works, you can jump ahead in the book and read this part in the smart pointers chapter: https://doc.rust-lang.org/stable/book/ch15-02-deref.html#implicit-deref-coercions-with-functions-and-methods"""
|
||||||
|
|
||||||
[[exercises]]
|
[[exercises]]
|
||||||
name = "strings3"
|
name = "strings3"
|
||||||
|
|
Loading…
Reference in a new issue