Fix or suppress {primitive}::new warnings in tests

Constructing boxed primitives was deprecated in #1447.

Some tests have been still using these methods, so this PR either updates them to use newly added {primitive}::from implementations or adds `#[allow(deprecated)]` where necessary.
This commit is contained in:
Ingvar Stepanyan
2019-04-17 18:25:45 +01:00
parent 10cbc789a8
commit d7650863ab
4 changed files with 18 additions and 18 deletions

View File

@ -39,9 +39,7 @@ fn parse_object() {
assert_eq!(y.as_bool(), Some(true));
let x = values.pop();
assert!(Number::is_integer(&x));
let x_num = Number::new(&x);
assert_eq!(x_num.value_of(), 5.0);
assert_eq!(x.as_f64().unwrap(), 5.0);
}
#[wasm_bindgen_test]