Use u32 params for String.from_char_code bindings

This commit is contained in:
Danielle Pham
2018-08-13 17:03:58 -04:00
parent fd5958b51b
commit 30fc99b724
2 changed files with 7 additions and 7 deletions

View File

@ -61,8 +61,8 @@ fn ends_with() {
#[wasm_bindgen_test]
fn from_char_code() {
let s = "½+¾=";
let codes : Vec<f64> = s.chars()
.map(|char| char as u32 as f64)
let codes : Vec<u32> = s.chars()
.map(|char| char as u32)
.collect();
assert_eq!(JsString::from_char_code1(codes[0]), "½");