Skip to content

Commit

Permalink
remove some comments and unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
n14little committed May 23, 2020
1 parent e537567 commit b41c589
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions boa/src/builtins/json/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
use crate::builtins::{
object::ObjectKind,
property::Property,
value::{ResultValue, Value, ValueData},
value::{ResultValue, Value},
};
use crate::exec::Interpreter;
use serde_json::{self, Value as JSONValue};
use std::ops::Deref;

#[cfg(test)]
mod tests;
Expand Down Expand Up @@ -134,21 +133,6 @@ pub fn stringify(_: &mut Value, args: &[Value], interpreter: &mut Interpreter) -
} else {
Ok(Value::from(object.to_json().to_string()))
}

// let object_to_return = Value::new_object(None);
// if let Some(arg) = args.get(1) {
// if let ValueData::Object(ref obj) = arg.data() {
// let replacer = (*obj).deref().borrow();
// match replacer.kind {
// ObjectKind::Function => {

// }
// _ => panic!("JSON.stringify replacer can only be an array or function"),
// }
// return Ok(Value::from(object_to_return.to_json().to_string()));
// }
// }
// panic!("cannot get replacer for JSON.stringify");
}

/// Create a new `JSON` object.
Expand Down

0 comments on commit b41c589

Please sign in to comment.