Run rustfmt over everything

This commit is contained in:
Alex Crichton
2018-11-27 12:07:59 -08:00
parent 4a70198143
commit 48f4adfa8c
45 changed files with 872 additions and 800 deletions

View File

@ -31,10 +31,7 @@ pub fn main() -> Result<(), JsValue> {
context.move_to(event.offset_x() as f64, event.offset_y() as f64);
pressed.set(true);
}) as Box<FnMut(_)>);
canvas.add_event_listener_with_callback(
"mousedown",
closure.as_ref().unchecked_ref(),
)?;
canvas.add_event_listener_with_callback("mousedown", closure.as_ref().unchecked_ref())?;
closure.forget();
}
{
@ -48,10 +45,7 @@ pub fn main() -> Result<(), JsValue> {
context.move_to(event.offset_x() as f64, event.offset_y() as f64);
}
}) as Box<FnMut(_)>);
canvas.add_event_listener_with_callback(
"mousemove",
closure.as_ref().unchecked_ref(),
)?;
canvas.add_event_listener_with_callback("mousemove", closure.as_ref().unchecked_ref())?;
closure.forget();
}
{
@ -62,10 +56,7 @@ pub fn main() -> Result<(), JsValue> {
context.line_to(event.offset_x() as f64, event.offset_y() as f64);
context.stroke();
}) as Box<FnMut(_)>);
canvas.add_event_listener_with_callback(
"mouseup",
closure.as_ref().unchecked_ref(),
)?;
canvas.add_event_listener_with_callback("mouseup", closure.as_ref().unchecked_ref())?;
closure.forget();
}