{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbamch0h.hatenablog.com%2Fentry%2F2022%2F09%2F11%2F014320\" title=\" \u30d9\u30af\u30bf\u578b\u5185\u306e\u8981\u7d20\u3092\u30eb\u30fc\u30d7\u5185\u3067\u501f\u7528\u3057\u3066\u30eb\u30fc\u30d7\u306e\u5916\u3067\u4f7f\u3046\u5834\u5408\u306f\u30d9\u30af\u30bf\u5909\u6570\u3092\u501f\u7528\u3057\u3066\u30eb\u30fc\u30d7\u3092\u56de\u305d\u3046 - bamchoh\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://bamch0h.hatenablog.com/","blog_title":"bamchoh\u2019s diary","published":"2022-09-11 01:43:20","image_url":null,"width":"100%","author_name":"bamch0h","url":"https://bamch0h.hatenablog.com/entry/2022/09/11/014320","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/bamch0h/","description":"\u4eca\u56de\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9 struct A { val: i32, } fn main() { let mut a_list: Vec<A> = vec![]; for i in 1..10 { a_list.push(A { val: i }); } let mut inner_elem = &A { val: 0 }; for a in a_list { match a.val { 3 => inner_elem = &a, _ => {} } } println!(\"{}\", inner_elem.val); } \u4e0a\u8a18\u306e\u3088\u3046\u306b\u30d9\u30af\u30bf\u578b\u5909\u6570\u306e\u8981\u7d20\u3092\u30eb\u30fc\u30d7\u306e\u4e2d\u3067\u501f\u7528\u3057\u3066\u30eb\u30fc\u30d7\u306e\u30b9\u30b3\u30fc\u30d7\u306e\u5916\u306e\u5909\u6570\u306b\u2026","title":" \u30d9\u30af\u30bf\u578b\u5185\u306e\u8981\u7d20\u3092\u30eb\u30fc\u30d7\u5185\u3067\u501f\u7528\u3057\u3066\u30eb\u30fc\u30d7\u306e\u5916\u3067\u4f7f\u3046\u5834\u5408\u306f\u30d9\u30af\u30bf\u5909\u6570\u3092\u501f\u7528\u3057\u3066\u30eb\u30fc\u30d7\u3092\u56de\u305d\u3046","height":"190","provider_url":"https://hatena.blog","version":"1.0","type":"rich","categories":["Rust"]}