1
Fork 0

Revert signature of eq_ignore_ascii_case() to original

Since the methods on u8 directly will shadow the AsciiExt methods,
we cannot change the signature without breaking everything. It
would have been nice to take `u8` as argument instead of `&u8`, but
we cannot break stuff! So this commit reverts it to the original
`&u8` version.
This commit is contained in:
Lukas Kalbertodt 2017-09-28 16:41:21 +02:00
parent 04070d1148
commit 5061c9fecb
2 changed files with 3 additions and 3 deletions

View file

@ -685,7 +685,7 @@ impl AsciiExt for [u8] {
#[inline]
fn eq_ignore_ascii_case(&self, other: &[u8]) -> bool {
self.len() == other.len() &&
self.iter().zip(other).all(|(a, &b)| {
self.iter().zip(other).all(|(a, b)| {
a.eq_ignore_ascii_case(b)
})
}