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