{"image_url":null,"categories":["rust"],"height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkakts.dev%2Fentry%2F2018%2F04%2F22%2F002211\" title=\"Rust: Error for copying String allocated memory to new variable. - kakts-log\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2018-04-22 00:22:11","type":"rich","title":"Rust: Error for copying String allocated memory to new variable.","description":"When I write Rust code as below, it occurs error. I tried to print two same String by copying memory. fn main() { let s1 = String::from(\"Hello\"); let s2 = s1; println!(\"{}, {}\", s1, s2); } error[E0382]: use of moved value: `s1` --> src/main.rs:14:24 | 13 | let s2 = s1; | -- value moved here 14 | pri\u2026","version":"1.0","author_url":"https://blog.hatena.ne.jp/kakts/","blog_url":"https://kakts.dev/","provider_url":"https://hatena.blog","width":"100%","blog_title":"kakts-log","url":"https://kakts.dev/entry/2018/04/22/002211","provider_name":"Hatena Blog","author_name":"kakts"}