Skip to content

Commit

Permalink
Use eq_ignore_ascii_case().
Browse files Browse the repository at this point in the history
This was detected by nightly Clippy.
  • Loading branch information
kpreid committed Oct 22, 2024
1 parent b10d864 commit 372d8a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions all-is-cubes-desktop/src/bin/all-is-cubes/command_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ pub(crate) struct DisplaySizeArg(pub Option<Size2D<u32, camera::NominalPixel>>);
impl FromStr for DisplaySizeArg {
type Err = String;
fn from_str(s: &str) -> Result<Self, Self::Err> {
if s.to_ascii_lowercase() == "auto" {
if s.eq_ignore_ascii_case("auto") {
Ok(DisplaySizeArg(None))
} else {
let dims: [u32; 2] = s
Expand All @@ -320,7 +320,7 @@ pub(crate) struct SpaceSizeArg(pub Option<GridSize>);
impl FromStr for SpaceSizeArg {
type Err = String;
fn from_str(s: &str) -> Result<Self, Self::Err> {
if s.to_ascii_lowercase() == "default" {
if s.eq_ignore_ascii_case("default") {
Ok(SpaceSizeArg(None))
} else {
let dims: [GridSizeCoord; 3] = s
Expand Down

0 comments on commit 372d8a3

Please sign in to comment.