Update preset.rs

This commit is contained in:
Jedsek 2023-01-19 19:09:45 +08:00 committed by GitHub
parent 5ef0648bf4
commit e80c7dff8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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!(