cargo +nightly fmt --all

Rustfmt all the things!
This commit is contained in:
Alex Crichton
2018-09-26 08:26:00 -07:00
parent a3e160744e
commit 7ecf4aae87
163 changed files with 2975 additions and 1998 deletions

View File

@ -1,14 +1,14 @@
use std::f64::consts::PI;
use std::f64::{NEG_INFINITY, NAN};
use std::f64::{NAN, NEG_INFINITY};
use wasm_bindgen::{JsCast, prelude::*};
use wasm_bindgen_test::*;
use js_sys::*;
use wasm_bindgen::{prelude::*, JsCast};
use wasm_bindgen_test::*;
#[wasm_bindgen_test]
fn math_extends() {
#[wasm_bindgen]
extern {
extern "C" {
#[wasm_bindgen(js_name = Math)]
static math: Math;
}
@ -18,15 +18,19 @@ fn math_extends() {
}
macro_rules! assert_eq {
($a:expr, $b:expr) => ({
($a:expr, $b:expr) => {{
let (a, b) = (&$a, &$b);
if f64::is_infinite(*a) && f64::is_infinite(*b) {
assert!(a == b);
} else {
assert!((*a - *b).abs() < 1.0e-6,
"not approximately equal {:?} ?= {:?}", a, b);
assert!(
(*a - *b).abs() < 1.0e-6,
"not approximately equal {:?} ?= {:?}",
a,
b
);
}
})
}};
}
#[wasm_bindgen_test]