Skip to content

Commit

Permalink
writeln instead of write
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwilliams committed May 1, 2020
1 parent b1e4f25 commit 27a70d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions boa/src/builtins/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ macro_rules! make_constructor_fn {
// Create the function object and point its instance prototype to Function.prototype
let mut constructor_obj = Object::function();
constructor_obj.set_construct(constructor_fn);

constructor_obj.set_internal_slot("__proto__", func_prototype);
let constructor_val = to_value(constructor_obj);

Expand Down
16 changes: 8 additions & 8 deletions boa/src/builtins/object/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ pub struct Object {

impl Debug for Object {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
write!(f, "{{\n")?;
write!(f, "\tkind: {}\n", self.kind)?;
write!(f, "\tstate: {:?}\n", self.state)?;
write!(f, "\tcall: {:?}\n", self.call)?;
write!(f, "\tconstruct: {:?}\n", self.construct)?;
write!(f, "\tproperties: {{\n")?;
writeln!(f, "{{")?;
writeln!(f, "\tkind: {}", self.kind)?;
writeln!(f, "\tstate: {:?}", self.state)?;
writeln!(f, "\tcall: {:?}", self.call)?;
writeln!(f, "\tconstruct: {:?}", self.construct)?;
writeln!(f, "\tproperties: {{")?;
for (key, _) in self.properties.iter() {
write!(f, "\t\t{}\n", key)?;
writeln!(f, "\t\t{}", key)?;
}
write!(f, "\t }}\n")?;
writeln!(f, "\t }}")?;
write!(f, "}}")
}
}
Expand Down

0 comments on commit 27a70d7

Please sign in to comment.