2022-06-27から1日間の記事一覧
HashSet in std::collections - Rust HashMap in std::collections - Rust 自前の構造体を HashSet の要素にしたり、HashMap のキーに使用するとコンパイルエラーになる。 use std::collections::HashSet; fn main() { { struct MyFoo { x: i32, } let mut h…
HashSet in std::collections - Rust HashMap in std::collections - Rust 自前の構造体を HashSet の要素にしたり、HashMap のキーに使用するとコンパイルエラーになる。 use std::collections::HashSet; fn main() { { struct MyFoo { x: i32, } let mut h…