Skip to content

Commit

Permalink
Style: Fix some clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
RageKnify committed Feb 3, 2021
1 parent 7a527a3 commit dac6393
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 2 additions & 3 deletions boa/src/builtins/set/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl BuiltIn for Set {
)
.data_property(
iterator_symbol,
values_function.clone(),
values_function,
Attribute::WRITABLE | Attribute::NON_ENUMERABLE | Attribute::CONFIGURABLE,
)
.data_property(to_string_tag, "Set", Attribute::CONFIGURABLE)
Expand Down Expand Up @@ -217,8 +217,7 @@ impl Set {

let res = if let Some(object) = this.as_object() {
if let Some(set) = object.borrow_mut().as_set_mut() {
let res = set.delete(&value);
res
set.delete(&value)
} else {
return context.throw_type_error("'this' is not a Set");
}
Expand Down
5 changes: 1 addition & 4 deletions boa/src/value/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,7 @@ pub(crate) fn log_string_from(x: &Value, print_internals: bool, print_children:
if print_children {
let entries = set
.iter()
.map(|value| {
let value = log_string_from(value, print_internals, false);
format!("{}", value)
})
.map(|value| log_string_from(value, print_internals, false))
.collect::<Vec<String>>()
.join(", ");
format!("Set {{ {} }}", entries)
Expand Down

0 comments on commit dac6393

Please sign in to comment.