mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 20:41:24 +00:00
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:
@ -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]
|
||||
|
Reference in New Issue
Block a user