Skip to content

Commit

Permalink
Remove unwanted dbg!, clean set_create
Browse files Browse the repository at this point in the history
  • Loading branch information
lameferret committed Jul 7, 2022
1 parent 753d5c8 commit 0ae6918
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions boa_engine/src/builtins/set/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,8 @@ impl Set {

/// Utility for constructing `Set` objects.
pub(crate) fn set_create(prototype: Option<JsObject>, context: &mut Context) -> JsObject {
let prototype = match prototype {
Some(prototype) => prototype,
None => context.intrinsics().constructors().set().prototype(),
};
let prototype =
prototype.unwrap_or_else(|| context.intrinsics().constructors().set().prototype());

JsObject::from_proto_and_data(prototype, ObjectData::set(OrderedSet::new()))
}
Expand Down Expand Up @@ -350,8 +348,6 @@ impl Set {
let callback_arg = &args[0];
let this_arg = args.get_or_undefined(1);

// dbg!(this_arg); // REMOVE DEBUG

// TODO: if condition should also check that we are not in strict mode
let this_arg = if this_arg.is_undefined() {
context.global_object().clone().into()
Expand All @@ -366,7 +362,6 @@ impl Set {
.as_object()
.and_then(|obj| {
obj.borrow().as_set_ref().map(|set| {
println!("SET: {:?}", set); // REMOVE DEBUG
set.get_index(index)
.map(|value| [value.clone(), value.clone(), this.clone()])
})
Expand Down
2 changes: 1 addition & 1 deletion boa_engine/src/object/jsobject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ impl JsObject {
}

/// Checks if it's a `MapIterator` object
///
///
/// # Panics
///
/// Panics if the object is currently mutably borrowed.
Expand Down

0 comments on commit 0ae6918

Please sign in to comment.