mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-22 17:21:35 +00:00
Run rustfmt over everything
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user