From 0ccbaf96ef8d44d2a7eb6f1080e4f2468dc54967 Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Tue, 12 Mar 2024 16:13:13 -0700 Subject: [PATCH] better compare --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 7daffdd..adcf418 100644 --- a/src/main.rs +++ b/src/main.rs @@ -149,7 +149,7 @@ fn parse_moves(moves_str: &str) -> Result, &'static str> { while let Some(c) = chars.next() { let nco = chars.peek(); match nco { - Some(nc) if (nc == &'2' || nc == &'\'') => { + Some(nc) if (*nc == '2' || *nc == '\'') => { let s = format!("{}{}", c, nc); let m = Move::from_str(s.as_str()).expect("unable to parse move"); moves.push(m);