Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
msuesskraut authored and MartinKavik committed Apr 10, 2021
1 parent 488e009 commit fd4fccc
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions examples/canvas/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawWindow)
use seed::{prelude::*, *};
use web_sys::{HtmlCanvasElement, WheelEvent};
use web_sys::HtmlCanvasElement;

// ------ ------
// Init
Expand Down Expand Up @@ -63,7 +63,7 @@ impl Default for Color {

enum Zoom {
In,
Out
Out,
}

enum Msg {
Expand Down Expand Up @@ -137,11 +137,7 @@ fn view(model: &Model) -> impl IntoNodes<Msg> {
let delta_y = event.delta_y();
(delta_y != 0.0).then(|| {
event.prevent_default();
Msg::Zoom(if delta_y < 0.0 {
Zoom::In
} else {
Zoom::Out
})
Msg::Zoom(if delta_y < 0.0 { Zoom::In } else { Zoom::Out })
})
}),
],
Expand Down

0 comments on commit fd4fccc

Please sign in to comment.