Skip to content

Commit

Permalink
Fix typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramirisu committed Oct 4, 2024
1 parent 45ae8aa commit d0a5802
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions src/game/transition.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
use std::fmt::Display;

use num_traits::FromPrimitive;

#[derive(Default, Debug, Clone, Copy, PartialEq, Eq, FromPrimitive)]
pub enum Transition {
#[default]
Classic,
Fxied,
Fixed,
Every10Lines,
Every4Lines,
}
Expand All @@ -23,7 +21,7 @@ impl Transition {
pub fn get_level(&self, start_level: usize, lines: usize) -> usize {
match self {
Transition::Classic => Self::get_level_classic(start_level, lines),
Transition::Fxied => Self::get_level_fixed(start_level, lines),
Transition::Fixed => Self::get_level_fixed(start_level, lines),
Transition::Every10Lines => Self::get_level_every_n_lines(start_level, lines, 10),
Transition::Every4Lines => Self::get_level_every_n_lines(start_level, lines, 4),
}
Expand Down Expand Up @@ -58,12 +56,6 @@ impl Transition {
}
}

impl Display for Transition {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Debug::fmt(&self, f)
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
2 changes: 1 addition & 1 deletion src/game_option_menu/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ fn update_ui_system(
text.sections[0].value = fname_opt("TRANSITION");
match game_config.transition {
Transition::Classic => text.sections[1].value = fopt_r("CLASSIC"),
Transition::Fxied => text.sections[1].value = fopt_m("FIXED"),
Transition::Fixed => text.sections[1].value = fopt_m("FIXED"),
Transition::Every10Lines => text.sections[1].value = fopt_m("10 LINES"),
Transition::Every4Lines => text.sections[1].value = fopt_l(" 4 LINES"),
};
Expand Down

0 comments on commit d0a5802

Please sign in to comment.