Skip to content

Commit e6d45c2

Browse files
committed
Make clippy happy.
1 parent 20326b3 commit e6d45c2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lexical-parse-integer/src/algorithm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ macro_rules! fmt_invalid_digit {
136136
let is_suffix = if uncased_base_suffix {
137137
$c == base_suffix
138138
} else {
139-
$c.to_ascii_lowercase() == base_suffix.to_ascii_lowercase()
139+
$c.eq_ignore_ascii_case(&base_suffix)
140140
};
141141
// NOTE: If we're using the `take_n` optimization where it can't
142142
// be the end, then the iterator cannot be done. So, in that case,

lexical-util/src/iterator.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pub unsafe trait Iter<'a> {
135135
#[inline(always)]
136136
fn first_is_uncased(&self, value: u8) -> bool {
137137
if let Some(&c) = self.first() {
138-
c.to_ascii_lowercase() == value.to_ascii_lowercase()
138+
c.eq_ignore_ascii_case(&value)
139139
} else {
140140
false
141141
}
@@ -334,7 +334,7 @@ pub trait DigitsIter<'a>: Iterator<Item = &'a u8> + Iter<'a> {
334334
#[inline(always)]
335335
fn peek_is_uncased(&mut self, value: u8) -> bool {
336336
if let Some(&c) = self.peek() {
337-
c.to_ascii_lowercase() == value.to_ascii_lowercase()
337+
c.eq_ignore_ascii_case(&value)
338338
} else {
339339
false
340340
}
@@ -387,7 +387,7 @@ pub trait DigitsIter<'a>: Iterator<Item = &'a u8> + Iter<'a> {
387387
/// sensitivity.
388388
#[inline(always)]
389389
fn read_if_value_uncased(&mut self, value: u8) -> Option<u8> {
390-
self.read_if(|x| x.to_ascii_lowercase() == value.to_ascii_lowercase())
390+
self.read_if(|x| x.eq_ignore_ascii_case(&value))
391391
}
392392

393393
/// Read a value if the value matches the provided one.

0 commit comments

Comments
 (0)