We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c437fcf commit c39e9f3Copy full SHA for c39e9f3
src/doc/guide.md
@@ -1481,7 +1481,7 @@ s.push_str(", world.");
1481
println!("{}", s);
1482
```
1483
1484
-You can coerce a `String` into a `&str` with the `as_slice()` method:
+You can get a `&str` view into a `String` with the `as_slice()` method:
1485
1486
```{rust}
1487
fn takes_slice(slice: &str) {
@@ -1514,7 +1514,7 @@ fn compare(string: String) {
1514
}
1515
1516
1517
-Converting a `String` to a `&str` is cheap, but converting the `&str` to a
+Viewing a `String` as a `&str` is cheap, but converting the `&str` to a
1518
`String` involves allocating memory. No reason to do that unless you have to!
1519
1520
That's the basics of strings in Rust! They're probably a bit more complicated
0 commit comments