better compare

This commit is contained in:
Michael Peters 2024-03-12 16:13:13 -07:00
parent 08fd126255
commit 0ccbaf96ef

View File

@ -149,7 +149,7 @@ fn parse_moves(moves_str: &str) -> Result<Vec<Move>, &'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);