2020-09-11から1日間の記事一覧
サンプルコード let mut s1 = String::from("hello"); // s2はmutable 参照 let s2 = &mut s1; print_type_name_of(s2); s2.push_str(" world"); /* error[E0382]: borrow of moved value: `s2` | 3 | let s2 = &mut s1; | -- move occurs because `s2` has …