Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
deepu105 committed Dec 6, 2024
1 parent 8b97cd2 commit 34b1499
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub struct TextAreaInput<'a> {
pub input_mode: InputMode,
}

impl<'a> TextAreaInput<'a> {
impl TextAreaInput<'_> {
fn new(input: Vec<String>) -> Self {
Self {
input: input.into(),
Expand Down
8 changes: 4 additions & 4 deletions src/app/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub fn get_secret_from_file_or_input(
alg: &Algorithm,
secret_string: &str,
) -> (JWTResult<Vec<u8>>, SecretType) {
return match alg {
match alg {
Algorithm::HS256 | Algorithm::HS384 | Algorithm::HS512 => {
if secret_string.starts_with('@') {
(
Expand Down Expand Up @@ -103,7 +103,7 @@ pub fn get_secret_from_file_or_input(
(Ok(secret_string.as_bytes().to_vec()), SecretType::Jwks)
}
}
};
}
}

pub fn strip_leading_symbol(secret_string: &str) -> String {
Expand Down Expand Up @@ -169,7 +169,7 @@ fn get_secret_file_type(secret_string: &str) -> SecretType {
}

fn map_external_error(ext_err: &Error) -> String {
return match ext_err.kind() {
match ext_err.kind() {
ErrorKind::InvalidToken => {
"The JWT provided is invalid".to_string()
}
Expand Down Expand Up @@ -204,7 +204,7 @@ fn map_external_error(ext_err: &Error) -> String {
}
ErrorKind::InvalidAlgorithm => "The JWT provided has a different signing algorithm than the one you provided".to_string(),
_ => format!("The JWT provided is invalid because {:?}", ext_err),
};
}
}

#[cfg(test)]
Expand Down

0 comments on commit 34b1499

Please sign in to comment.