Skip to content

Commit a0f5ca9

Browse files
let s = &mut String::from("hello"); -> let mut s = String::from("hello");
1 parent a0fe7a5 commit a0f5ca9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/language/strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ There are differences in working with strings in Rust and .NET, but the
1717
equivalents above should be a good starting point. One of the differences is
1818
that Rust strings are UTF-8 encoded, but .NET strings are UTF-16 encoded.
1919
Further .NET strings are immutable, but Rust strings can be mutable when declared
20-
as such, for example `let s = &mut String::from("hello");`.
20+
as such, for example `let mut s = String::from("hello");`.
2121

2222
There are also differences in using strings due to the concept of ownership. To
2323
read more about ownership with the String Type, see the [Rust Book][ownership-string-type-example].

0 commit comments

Comments
 (0)