Skip to content

Commit

Permalink
feat: fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuttymoon committed Apr 19, 2024
1 parent dbf2c49 commit 852d0b2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/ash_cli/src/utils/parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ use std::str::FromStr;
// Parse an ID from a string
pub(crate) fn parse_id(id: &str) -> Result<Id, CliError> {
// Try to parse the ID as CB58 first
let id_from_cb58 = Id::from_str(id);
if id_from_cb58.is_ok() {
return Ok(id_from_cb58.unwrap());
if let Ok(id) = Id::from_str(id) {
return Ok(id);
}

// Then try to parse it as hex
Expand Down

0 comments on commit 852d0b2

Please sign in to comment.