chiark / gitweb /
adjust re node.js ishness
[talk-2019-ghm-rust.git] / borrow-mut-example.txt
1 fn main() {
2     let mut s = String::from("hello");
3     change(&mut s);
4     println!("{}", s);
5 }
6
7 fn change(some_string: &mut String) {
8     some_string.push_str(", world");
9 }