Skip to content

Commit

Permalink
push string examples
Browse files Browse the repository at this point in the history
Signed-off-by: Fredrik Klingenberg <fredrkl@gmail.com>
  • Loading branch information
fredrkl committed Nov 19, 2023
1 parent 5b34b3f commit 132f29a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions projects/collections/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,12 @@ fn main() {
}
}

let s = String::new();
let _reference = &s;
let data = "initial contents";
let mut _s = data.to_string();
let s2 = "initial contents";
_s.push_str(s2);
println!("{s2}");

}

0 comments on commit 132f29a

Please sign in to comment.