Cargo format

This commit is contained in:
Sijmen 2021-11-13 04:20:38 +01:00
parent 479d9cd4fd
commit a7fb11119f
Signed by: vijfhoek
GPG key ID: DAF7821E067D9C48

View file

@ -2,22 +2,17 @@ enum Msg {
AddOne, AddOne,
} }
struct Model { struct Model {
link: yew::ComponentLink<Self>, link: yew::ComponentLink<Self>,
value: i64, value: i64,
} }
impl yew::Component for Model { impl yew::Component for Model {
type Message = Msg; type Message = Msg;
type Properties = (); type Properties = ();
fn create(_props: Self::Properties, link: yew::ComponentLink<Self>) -> Self { fn create(_props: Self::Properties, link: yew::ComponentLink<Self>) -> Self {
Self { Self { link, value: 0 }
link,
value: 0,
}
} }
fn update(&mut self, msg: Self::Message) -> yew::ShouldRender { fn update(&mut self, msg: Self::Message) -> yew::ShouldRender {
@ -91,7 +86,6 @@ impl yew::Component for Model {
} }
} }
fn main() { fn main() {
yew::start_app::<Model>(); yew::start_app::<Model>();
} }