Skip to content

Commit 6c27376

Browse files
committed
Run rustfmt
1 parent 93fedf8 commit 6c27376

File tree

7 files changed

+27
-15
lines changed

7 files changed

+27
-15
lines changed

crates/backend/src/codegen.rs

-3
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,6 @@ impl TryToTokens for ast::Export {
456456
})
457457
},
458458
)
459-
460459
} else {
461460
(
462461
quote! { wasm_bindgen::JsValue },
@@ -467,13 +466,11 @@ impl TryToTokens for ast::Export {
467466
},
468467
)
469468
}
470-
471469
} else if self.start {
472470
(
473471
quote! { () },
474472
quote! { <#syn_ret as wasm_bindgen::__rt::Start>::start(#ret) },
475473
)
476-
477474
} else {
478475
(quote! { #syn_ret }, quote! { #ret })
479476
};

crates/cli/tests/interface-types.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,13 @@ fn runtest(test: &Path) -> Result<()> {
5454
.arg("--no-typescript");
5555
exec(&mut bindgen)?;
5656

57-
exec(Command::new("node")
58-
.arg("--experimental-wasm-anyref")
59-
.arg("--experimental-wasm-mv")
60-
.arg(&js).env("NODE_PATH", td.path()))?;
57+
exec(
58+
Command::new("node")
59+
.arg("--experimental-wasm-anyref")
60+
.arg("--experimental-wasm-mv")
61+
.arg(&js)
62+
.env("NODE_PATH", td.path()),
63+
)?;
6164

6265
Ok(())
6366
}

crates/js-sys/tests/wasm/Array.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ fn to_vec() {
8787
.into_iter()
8888
.collect::<js_sys::Array>();
8989

90-
assert_eq!(array.to_vec(), vec![JsValue::from("a"), JsValue::from("b"), JsValue::from("c")]);
90+
assert_eq!(
91+
array.to_vec(),
92+
vec![JsValue::from("a"), JsValue::from("b"), JsValue::from("c")]
93+
);
9194
}
9295

9396
#[wasm_bindgen_test]
@@ -96,7 +99,10 @@ fn iter() {
9699
.into_iter()
97100
.collect::<js_sys::Array>();
98101

99-
assert_eq!(array.iter().collect::<Vec<JsValue>>(), vec![JsValue::from("a"), JsValue::from("b"), JsValue::from("c")]);
102+
assert_eq!(
103+
array.iter().collect::<Vec<JsValue>>(),
104+
vec![JsValue::from("a"), JsValue::from("b"), JsValue::from("c")]
105+
);
100106

101107
let mut iter = array.iter();
102108

crates/js-sys/tests/wasm/Symbol.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use js_sys::*;
22
use wasm_bindgen::prelude::*;
3-
use wasm_bindgen_test::*;
43
use wasm_bindgen_futures::JsFuture;
4+
use wasm_bindgen_test::*;
55

66
#[wasm_bindgen(module = "tests/wasm/Symbol.js")]
77
extern "C" {
@@ -41,7 +41,9 @@ fn iterator() {
4141

4242
#[wasm_bindgen_test]
4343
async fn async_iterator() {
44-
JsFuture::from(test_async_iterator(&Symbol::async_iterator())).await.unwrap_throw();
44+
JsFuture::from(test_async_iterator(&Symbol::async_iterator()))
45+
.await
46+
.unwrap_throw();
4547
}
4648

4749
#[wasm_bindgen_test]
@@ -103,7 +105,10 @@ fn key_for() {
103105
#[wasm_bindgen_test]
104106
fn to_string() {
105107
assert_eq!(Symbol::iterator().to_string(), "Symbol(Symbol.iterator)");
106-
assert_eq!(Symbol::async_iterator().to_string(), "Symbol(Symbol.asyncIterator)");
108+
assert_eq!(
109+
Symbol::async_iterator().to_string(),
110+
"Symbol(Symbol.asyncIterator)"
111+
);
107112
assert_eq!(Symbol::for_("foo").to_string(), "Symbol(foo)");
108113
assert_eq!(gensym("desc".into()).to_string(), "Symbol(desc)");
109114
}

crates/typescript-tests/src/simple_fn.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ use wasm_bindgen::prelude::*;
44
pub fn greet(_: &str) {}
55

66
#[wasm_bindgen]
7-
pub fn take_and_return_bool(_: bool) -> bool { true }
7+
pub fn take_and_return_bool(_: bool) -> bool {
8+
true
9+
}

crates/wasm-conventions/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#![deny(missing_docs, missing_debug_implementations)]
1010

1111
use anyhow::{anyhow, bail, Error};
12-
use walrus::{GlobalId, GlobalKind, MemoryId, Module, ValType, InitExpr, ir::Value};
12+
use walrus::{ir::Value, GlobalId, GlobalKind, InitExpr, MemoryId, Module, ValType};
1313

1414
/// Get a Wasm module's canonical linear memory.
1515
pub fn get_memory(module: &Module) -> Result<MemoryId, Error> {

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,6 @@ pub mod __rt {
11171117
}
11181118
}
11191119

1120-
11211120
/// An internal helper trait for usage in `#[wasm_bindgen(start)]`
11221121
/// functions to throw the error (if it is `Err`).
11231122
pub trait Start {

0 commit comments

Comments
 (0)