slice.md, fixed gramatical error

If you want know more -> If you want to know more
This commit is contained in:
Ashli G
2023-08-05 22:42:31 +02:00
committed by GitHub
parent 88191e18b2
commit 7eb79a3d81

View File

@ -85,7 +85,7 @@ fn main() {
let mut s = String::from("hello world");
// Here, &s is `&String` type, but `first_word` need a `&str` type.
// It works because `&String` can be implicitly converted to `&str. If you want know more, this is called `Deref coercion`.
// It works because `&String` can be implicitly converted to `&str. If you want to know more, this is called `Deref coercion`.
let word = first_word(&s);
s.clear(); // error!