rustfmt all the things

This commit is contained in:
R. Andrew Ohana
2018-06-27 22:42:34 -07:00
parent a29e71ec49
commit 9127a0419f
62 changed files with 2724 additions and 1400 deletions

View File

@ -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;
}
}
}