Skip to content

Commit

Permalink
Fixes for clippy --all-features --all targets
Browse files Browse the repository at this point in the history
  • Loading branch information
nekevss committed Mar 9, 2023
1 parent 718fea3 commit 98b2ff0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion boa_engine/src/builtins/map/ordered_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ enum MapKey {
}

// This ensures that a MapKey::Key(value) hashes to the same as value. The derived PartialEq implementation still holds.
#[allow(clippy::derive_hash_xor_eq)]
#[allow(clippy::derived_hash_with_manual_eq)]
impl Hash for MapKey {
fn hash<H: Hasher>(&self, state: &mut H) {
match self {
Expand Down
1 change: 0 additions & 1 deletion boa_engine/src/object/internal_methods/integer_indexed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ pub(crate) fn integer_indexed_exotic_own_property_keys(
// a. For each integer i starting with 0 such that i < O.[[ArrayLength]], in ascending order, do
// i. Add ! ToString(𝔽(i)) as the last element of keys.
(0..inner.array_length())
.into_iter()
.map(|index| PropertyKey::Index(index as u32))
.collect()
};
Expand Down
2 changes: 1 addition & 1 deletion boa_engine/src/object/internal_methods/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub(crate) fn string_exotic_own_property_keys(

// 5. For each integer i starting with 0 such that i < len, in ascending order, do
// a. Add ! ToString(𝔽(i)) as the last element of keys.
keys.extend((0..len).into_iter().map(Into::into));
keys.extend((0..len).map(Into::into));

// 6. For each own property key P of O such that P is an array index
// and ! ToIntegerOrInfinity(P) ≥ len, in ascending numeric index order, do
Expand Down
2 changes: 1 addition & 1 deletion boa_parser/src/lexer/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl StringLiteral {
0x005C /* \ */ => Some((0x005C /* \ */, None)),
0x0030 /* 0 */ if cursor
.peek()?
.filter(|next_byte| (b'0'..=b'9').contains(next_byte))
.filter(u8::is_ascii_digit)
.is_none() =>
Some((0x0000 /* NULL */, None)),
0x0078 /* x */ => {
Expand Down

0 comments on commit 98b2ff0

Please sign in to comment.