From 523bae94f200246e369e67f27e974ddb9113a838 Mon Sep 17 00:00:00 2001 From: LinlyBoi Date: Sun, 25 Dec 2022 10:10:50 +0200 Subject: [PATCH] snapped async fn --- frontend/src/fetching.rs | 15 ++++++--------- frontend/src/shadowrealm.rs | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/frontend/src/fetching.rs b/frontend/src/fetching.rs index 117a500..a827e6e 100644 --- a/frontend/src/fetching.rs +++ b/frontend/src/fetching.rs @@ -121,14 +121,15 @@ impl Component for RandomCommit { } //Generate Struct and implement component for driver using CommonDriver struct Driver { - driver: FetchState, + driver: FetchState, } +//implement the component for Driver using a string impl Component for Driver { - type Message = Msg; + type Message = Msg; type Properties = (); fn create(_ctx: &Context) -> Self { Self { - driver: FetchState::NotFetching, //Default state is not fetching anything + driver: FetchState::NotFetching, } } @@ -164,12 +165,11 @@ impl Component for Driver { } fn view(&self, ctx: &Context) -> Html { - //render the component into HTML match &self.driver { FetchState::NotFetching => html! { <>