Skip to content

Commit 8520176

Browse files
authored
Fix clippy warnings (mozilla#1011)
1 parent dd4033c commit 8520176

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/c_macro.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ const DOLLARS: [u8; 2048] = [b'$'; 2048];
66

77
#[inline(always)]
88
fn is_identifier_part(c: u8) -> bool {
9-
(b'A'..=b'Z').contains(&c)
10-
|| (b'a'..=b'z').contains(&c)
11-
|| (b'0'..=b'9').contains(&c)
12-
|| c == b'_'
9+
c.is_ascii_uppercase() || c.is_ascii_lowercase() || c.is_ascii_digit() || c == b'_'
1310
}
1411

1512
#[inline(always)]
1613
fn is_identifier_starter(c: u8) -> bool {
17-
(b'A'..=b'Z').contains(&c) || (b'a'..=b'z').contains(&c) || c == b'_'
14+
c.is_ascii_uppercase() || c.is_ascii_lowercase() || c == b'_'
1815
}
1916

2017
#[inline(always)]

src/node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl<'a> Node<'a> {
2424
pub(crate) fn children(&self) -> impl ExactSizeIterator<Item = Node<'a>> {
2525
let mut cursor = self.0.walk();
2626
cursor.goto_first_child();
27-
(0..self.object().child_count()).into_iter().map(move |_| {
27+
(0..self.object().child_count()).map(move |_| {
2828
let result = Node::new(cursor.node());
2929
cursor.goto_next_sibling();
3030
result

0 commit comments

Comments
 (0)