~ruther/map-led-strip

a026fa675a65a579fca29686a862f994b21e2a99 — František Boháček 1 year, 9 months ago ca6d33b
feat: compare case insensitive
2 files changed, 2 insertions(+), 2 deletions(-)

M src/commands/command_argument.rs
M src/map.rs
M src/commands/command_argument.rs => src/commands/command_argument.rs +1 -1
@@ 52,7 52,7 @@ impl<'d> CommandArgument<'d>
        for (i, c) in self.data.iter().enumerate() {
            let compare_against = to[i];

            if compare_against != (*c) as u8 {
            if compare_against != (*c) as u8 && compare_against != (((*c) as u8) - b'a' + b'A') {
                return false;
            }
        }

M src/map.rs => src/map.rs +1 -1
@@ 101,7 101,7 @@ impl<'d> Map<'d> {

            let mut matches = true;
            for (j, c) in current.chars().enumerate() {
                if name[j] != c {
                if name[j] != c && (name[j] as u8 - b'a' + b'A') != (c as u8) {
                    matches = false;
                    break;
                }

Do not follow this link