From 56c8610bdc97bf6703da0fe069f0fc6d39d25912 Mon Sep 17 00:00:00 2001 From: Deepu Date: Sat, 13 Jan 2024 13:25:42 +0100 Subject: [PATCH] polish --- src/app/jwt_decoder.rs | 4 +++- src/app/jwt_utils.rs | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/jwt_decoder.rs b/src/app/jwt_decoder.rs index 8bba1d0..0231308 100644 --- a/src/app/jwt_decoder.rs +++ b/src/app/jwt_decoder.rs @@ -8,7 +8,9 @@ use serde_derive::{Deserialize, Serialize}; use serde_json::{to_string_pretty, Value}; use super::{ - jwt_utils::{decoding_key_from_jwks_secret, get_secret_from_file_or_input, JWTError, JWTResult, SecretType}, + jwt_utils::{ + decoding_key_from_jwks_secret, get_secret_from_file_or_input, JWTError, JWTResult, SecretType, + }, models::{ScrollableTxt, TabRoute, TabsState}, ActiveBlock, App, Route, RouteId, TextInput, }; diff --git a/src/app/jwt_utils.rs b/src/app/jwt_utils.rs index 8ab4e36..f35bd1c 100644 --- a/src/app/jwt_utils.rs +++ b/src/app/jwt_utils.rs @@ -63,7 +63,10 @@ pub enum SecretType { Plain, } -pub fn get_secret_from_file_or_input(alg: &Algorithm, secret_string: &str) -> (JWTResult>, SecretType) { +pub fn get_secret_from_file_or_input( + alg: &Algorithm, + secret_string: &str, +) -> (JWTResult>, SecretType) { return match alg { Algorithm::HS256 | Algorithm::HS384 | Algorithm::HS512 => { if secret_string.starts_with('@') {