diff --git a/exercises/practice/minesweeper/tests/minesweeper.rs b/exercises/practice/minesweeper/tests/minesweeper.rs index f05255e5c..807ede4ae 100644 --- a/exercises/practice/minesweeper/tests/minesweeper.rs +++ b/exercises/practice/minesweeper/tests/minesweeper.rs @@ -5,9 +5,10 @@ fn remove_annotations(board: &[&str]) -> Vec { } fn remove_annotations_in_row(row: &str) -> String { - row.chars() - .map(|ch| match ch { - '*' => '*', + row.as_bytes() + .iter() + .map(|&ch| match ch { + b'*' => '*', _ => ' ', }) .collect()