From b41c589157d3ae092675018d11284c1d4b64914f Mon Sep 17 00:00:00 2001 From: Nick Little Date: Tue, 19 May 2020 23:54:04 -0500 Subject: [PATCH] remove some comments and unused imports --- boa/src/builtins/json/mod.rs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/boa/src/builtins/json/mod.rs b/boa/src/builtins/json/mod.rs index cb14eb397de..b657c808407 100644 --- a/boa/src/builtins/json/mod.rs +++ b/boa/src/builtins/json/mod.rs @@ -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; @@ -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.