| 1 | extern crate hash32rust-analyzer cargo hash32 0.3.1 hash32/; |
| 2 | |
| 3 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::hashrust-analyzer cargo std https://github.com/rust-lang/rust/library/std hash/::Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/Hash#; |
| 4 | |
| 5 | use hash32rust-analyzer cargo hash32 0.3.1 crate/::{FnvHasherrust-analyzer cargo hash32 0.3.1 fnv/Hasher#, Hasherrust-analyzer cargo hash32 0.3.1 Hasher#}; |
| 6 | |
| 7 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/macros/Hash:)] |
| 8 | struct Ledrust-analyzer cargo hash32 0.3.1 Led# { |
| 9 | staterust-analyzer cargo hash32 0.3.1 Led#state.: bool, |
| 10 | } |
| 11 | |
| 12 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/macros/Hash:)] |
| 13 | struct Ipv4Addrrust-analyzer cargo hash32 0.3.1 Ipv4Addr#([u8; 4]); |
| 14 | |
| 15 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/macros/Hash:)] |
| 16 | struct Genericrust-analyzer cargo hash32 0.3.1 Generic#<T> { |
| 17 | innerrust-analyzer cargo hash32 0.3.1 Generic#inner.: T, |
| 18 | } |
| 19 | |
| 20 | fn mainrust-analyzer cargo hash32 0.3.1 main().() { |
| 21 | let mut fnv = FnvHasherrust-analyzer cargo hash32 0.3.1 fnv/Hasher#::defaultrust-analyzer cargo hash32 0.3.1 fnv/impl#[Hasher][Default]default().(); |
| 22 | Ledrust-analyzer cargo hash32 0.3.1 Led# { staterust-analyzer cargo hash32 0.3.1 Led#state.: true }.hashrust-analyzer cargo hash32 0.3.1 impl#[Led][Hash]hash().(&mut fnv); |
| 23 | Genericrust-analyzer cargo hash32 0.3.1 Generic# { innerrust-analyzer cargo hash32 0.3.1 Generic#inner.: 0 }.hashrust-analyzer cargo hash32 0.3.1 impl#[`Generic<T>`][Hash]hash().(&mut fnv); |
| 24 | Ipv4Addrrust-analyzer cargo hash32 0.3.1 Ipv4Addr#([127, 0, 0, 1]).hashrust-analyzer cargo hash32 0.3.1 impl#[Ipv4Addr][Hash]hash().(&mut fnv); |
| 25 | printlnrust-analyzer cargo std https://github.com/rust-lang/rust/library/std macros/println!!("{}", fnv.finish32rust-analyzer cargo hash32 0.3.1 fnv/impl#[Hasher][Hasher]finish32().()) |
| 26 | } |