mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-13 04:51:23 +00:00
rustfmt all the things
This commit is contained in:
@ -5,7 +5,7 @@ extern crate wasm_bindgen;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen]
|
||||
extern {
|
||||
extern "C" {
|
||||
#[wasm_bindgen(js_namespace = console)]
|
||||
fn log(s: &str);
|
||||
}
|
||||
@ -14,7 +14,7 @@ extern {
|
||||
#[wasm_bindgen]
|
||||
pub struct Counter {
|
||||
key: char,
|
||||
count: i32
|
||||
count: i32,
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
@ -25,7 +25,10 @@ impl Counter {
|
||||
}
|
||||
pub fn new(key: char, count: i32) -> Counter {
|
||||
log(&format!("Counter::new({}, {})", key, count));
|
||||
Counter { key: key, count: count }
|
||||
Counter {
|
||||
key: key,
|
||||
count: count,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn key(&self) -> char {
|
||||
@ -46,4 +49,4 @@ impl Counter {
|
||||
pub fn update_key(&mut self, key: char) {
|
||||
self.key = key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user