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.
let s = &mut String::from("hello");
let mut s = String::from("hello");
1 parent a0fe7a5 commit a0f5ca9Copy full SHA for a0f5ca9
src/language/strings.md
@@ -17,7 +17,7 @@ There are differences in working with strings in Rust and .NET, but the
17
equivalents above should be a good starting point. One of the differences is
18
that Rust strings are UTF-8 encoded, but .NET strings are UTF-16 encoded.
19
Further .NET strings are immutable, but Rust strings can be mutable when declared
20
-as such, for example `let s = &mut String::from("hello");`.
+as such, for example `let mut s = String::from("hello");`.
21
22
There are also differences in using strings due to the concept of ownership. To
23
read more about ownership with the String Type, see the [Rust Book][ownership-string-type-example].
0 commit comments