Skip to content

Commit

Permalink
Rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
c410-f3r committed Apr 29, 2019
1 parent 36c0a13 commit 0c4cdef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
21 changes: 9 additions & 12 deletions crates/js-sys/tests/wasm/JsString.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ fn from_char_code() {
"½+¾="
);

let codes_u16: Vec<u16> = codes.into_iter().map(|code| {
assert!(code <= u32::from(u16::max_value()));
code as u16
}).collect();
let codes_u16: Vec<u16> = codes
.into_iter()
.map(|code| {
assert!(code <= u32::from(u16::max_value()));
code as u16
})
.collect();

assert_eq!(
JsString::from_char_code(&codes_u16),
"½+¾="
);
assert_eq!(JsString::from_char_code(&codes_u16), "½+¾=");
}

#[wasm_bindgen_test]
Expand All @@ -121,10 +121,7 @@ fn from_code_point() {
JsString::from_code_point4(codes[0], codes[1], codes[2], codes[3]).unwrap(),
"☃★♲你"
);
assert_eq!(
JsString::from_code_point(&codes).unwrap(),
"☃★♲你"
);
assert_eq!(JsString::from_code_point(&codes).unwrap(), "☃★♲你");

assert!(!JsString::from_code_point1(0x10FFFF).is_err());
assert!(JsString::from_code_point1(0x110000).is_err());
Expand Down
2 changes: 1 addition & 1 deletion crates/js-sys/tests/wasm/SharedArrayBuffer.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use js_sys::*;
use wasm_bindgen::JsCast;
use wasm_bindgen::prelude::*;
use wasm_bindgen::JsCast;
use wasm_bindgen_test::*;

#[wasm_bindgen(module = "tests/wasm/SharedArrayBuffer.js")]
Expand Down

0 comments on commit 0c4cdef

Please sign in to comment.