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.
2 parents a1abae9 + 523eff5 commit ae58bd6Copy full SHA for ae58bd6
examples/std/str/str.rs
@@ -1,5 +1,3 @@
1
-#![feature(collections)]
2
-
3
fn main() {
4
// (all the type annotations are superfluous)
5
// A reference to a string allocated in read only memory
@@ -33,7 +31,7 @@ fn main() {
33
31
println!("Used characters: {}", trimmed_str);
34
32
35
// Heap allocate a string
36
- let alice = String::from_str("I like dogs");
+ let alice = String::from("I like dogs");
37
// Allocate new memory and store the modified string there
38
let bob: String = alice.replace("dog", "cat");
39
0 commit comments