diff --git a/boa/src/builtins/set/mod.rs b/boa/src/builtins/set/mod.rs index 58c04bbc02a..49e387c898d 100644 --- a/boa/src/builtins/set/mod.rs +++ b/boa/src/builtins/set/mod.rs @@ -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) @@ -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"); } diff --git a/boa/src/value/display.rs b/boa/src/value/display.rs index 3ecb5849592..cb7a0d9e93d 100644 --- a/boa/src/value/display.rs +++ b/boa/src/value/display.rs @@ -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::>() .join(", "); format!("Set {{ {} }}", entries)