Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Rust 1.68 clippy fixes #2646

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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