summaryrefslogtreecommitdiffstats
path: root/examples/game_of_life/src/preset.rs
diff options
context:
space:
mode:
authorLibravatar Bingus <shankern@protonmail.com>2023-02-15 14:55:02 -0800
committerLibravatar Bingus <shankern@protonmail.com>2023-02-15 14:55:02 -0800
commit63fb608d8bea8a653bf011f5f9cffc88525576e0 (patch)
tree938c15b85fd9d27ee3a82806cf83bc211e7b94dd /examples/game_of_life/src/preset.rs
parent64e0e817c27d720dc954ee94de58ded35b3f9f9a (diff)
parent0cb72f69716adc82ad85a0ee7120edb6e653b0c0 (diff)
downloadiced-63fb608d8bea8a653bf011f5f9cffc88525576e0.tar.gz
iced-63fb608d8bea8a653bf011f5f9cffc88525576e0.tar.bz2
iced-63fb608d8bea8a653bf011f5f9cffc88525576e0.zip
Merge remote-tracking branch 'origin/master' into feat/multi-window-support
# Conflicts: # native/src/command/action.rs # native/src/window/action.rs # winit/src/window.rs
Diffstat (limited to 'examples/game_of_life/src/preset.rs')
-rw-r--r--examples/game_of_life/src/preset.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/examples/game_of_life/src/preset.rs b/examples/game_of_life/src/preset.rs
index 964b9120..552527b1 100644
--- a/examples/game_of_life/src/preset.rs
+++ b/examples/game_of_life/src/preset.rs
@@ -1,6 +1,7 @@
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
pub enum Preset {
Custom,
+ #[default]
Xkcd,
Glider,
SmallExploder,
@@ -114,12 +115,6 @@ impl Preset {
}
}
-impl Default for Preset {
- fn default() -> Preset {
- Preset::Xkcd
- }
-}
-
impl std::fmt::Display for Preset {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(