diff options
author | Carlo Milanesi <carlo.milanesi@libero.it> | 2016-05-28 15:22:22 +0200 |
---|---|---|
committer | Carlo Milanesi <carlo.milanesi@libero.it> | 2016-05-28 15:22:22 +0200 |
commit | 08c653ad62e0e21cf7873aa6a8e5195d25f15240 (patch) | |
tree | 301aa0b10045e30c9acb7dc4b5b2f932af55779f /rust.html.markdown | |
parent | 060da6fe0c2d76bf7522348d7e39b18948493c3a (diff) |
Corrected definition of "slice" concept
Diffstat (limited to 'rust.html.markdown')
-rw-r--r-- | rust.html.markdown | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rust.html.markdown b/rust.html.markdown index d0c56b4a..f82f7785 100644 --- a/rust.html.markdown +++ b/rust.html.markdown @@ -81,9 +81,10 @@ fn main() { let s: String = "hello world".to_string(); // A string slice – an immutable view into another string - // This is basically an immutable pointer to a string – it doesn’t + // This is basically an immutable pair of pointers to a string – it doesn’t // actually contain the contents of a string, just a pointer to - // something that does (in this case, `s`) + // the begin and a pointer to the end of a string buffer, + // statically allocated or contained in another object (in this case, `s`) let s_slice: &str = &s; println!("{} {}", s, s_slice); // hello world hello world |