From c1e91ff1bbee7101ed5fcb02184028e6bf54c023 Mon Sep 17 00:00:00 2001 From: jane400 Date: Wed, 2 Oct 2024 17:44:01 +0200 Subject: [PATCH] chrore: format: paket.login --- paket/src/login.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/paket/src/login.rs b/paket/src/login.rs index 67400ce..f514f27 100644 --- a/paket/src/login.rs +++ b/paket/src/login.rs @@ -191,15 +191,12 @@ impl AsyncComponent for Login { return value; }); if let Ok(value) = refresh_token { - match value { - Some(value) => { - model.refresh_token = Some(RefreshToken::new(value).unwrap()); - sender.input(LoginInput::NeedsRefresh); - } - None => { - sender.input(LoginInput::NeedsLogin); - } - }; + model.refresh_token = value; + if model.refresh_token.is_some() { + sender.input(LoginInput::NeedsRefresh); + } else { + sender.input(LoginInput::NeedsLogin); + } } }