add missing rust annotations

This commit is contained in:
Steve Klabnik 2016-01-22 10:32:27 -05:00
parent a8f8f7c81a
commit 11ed1dedc2

View File

@ -156,7 +156,7 @@ let slice = &s[1..];
With this in mind, lets re-write `first_word()` to return a slice:
```
```rust
fn first_word(s: &String) -> &str {
let bytes = s.as_bytes();
@ -234,7 +234,7 @@ Remember how we talked about string literals being stored inside of the binary
itself? Now that we know about slices, we can now properly understand string
literals.
```
```rust
let s = "Hello, world!";
```