Mercurial > crates > nonstick
comparison src/constants.rs @ 186:5e4ea9650f87
Derive `hash` where it makes sense.
| author | Paul Fisher <paul@pfish.zone> |
|---|---|
| date | Thu, 31 Jul 2025 14:48:32 -0400 |
| parents | fb8b547b36b7 |
| children | 5074d8e00560 |
comparison
equal
deleted
inserted
replaced
| 185:fb8b547b36b7 | 186:5e4ea9650f87 |
|---|---|
| 11 ( | 11 ( |
| 12 $(#[$m:meta])* | 12 $(#[$m:meta])* |
| 13 $viz:vis $name:ident($wraps:ty); | 13 $viz:vis $name:ident($wraps:ty); |
| 14 ) => { | 14 ) => { |
| 15 $(#[$m])* | 15 $(#[$m])* |
| 16 #[derive(Clone, Copy, Debug, PartialEq, Eq)] | 16 #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
| 17 #[repr(transparent)] | 17 #[repr(transparent)] |
| 18 $viz struct $name($wraps); | 18 $viz struct $name($wraps); |
| 19 | 19 |
| 20 impl From<$wraps> for $name { | 20 impl From<$wraps> for $name { |
| 21 fn from(value: $wraps) -> Self { | 21 fn from(value: $wraps) -> Self { |
| 263 $key:ident = $value:path, | 263 $key:ident = $value:path, |
| 264 )* | 264 )* |
| 265 } | 265 } |
| 266 ) => { | 266 ) => { |
| 267 $(#[$om])* | 267 $(#[$om])* |
| 268 #[derive(Copy, Clone, Debug, PartialEq, Eq)] | 268 #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] |
| 269 pub enum $name { | 269 pub enum $name { |
| 270 $( | 270 $( |
| 271 $(#[$im])* | 271 $(#[$im])* |
| 272 $key, | 272 $key, |
| 273 )* | 273 )* |
