day05 performance push part 2 through more efficient case insensitive comparison
This commit is contained in:
@@ -22,7 +22,7 @@ pub fn task2() {
|
||||
reduce(
|
||||
&input
|
||||
.chars()
|
||||
.filter(|ch| ch.to_lowercase().next().unwrap() != c)
|
||||
.filter(|ch| ch.eq_ignore_ascii_case(&c))
|
||||
.collect::<String>(),
|
||||
).len(),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user