Fix the build

This commit is contained in:
Steve Klabnik
2016-01-20 19:26:54 -05:00
parent fbffce8a6e
commit cabe126907
+5
View File
@@ -52,6 +52,11 @@ DIAGRAM GOES HERE of a &String pointing at a String, with (ptr, len, capacity)
Let’s take a closer look at the function call here:
```rust
# fn calculate_length(s: &String) -> usize {
# let length = s.len();
#
# length
# }
let s1 = String::from("hello");
let len = calculate_length(&s1);