Skip to content

Commit

Permalink
clippy: Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian committed Sep 12, 2023
1 parent 9d5fe12 commit a46c234
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,15 @@ pub(crate) fn get_source_address_bytes(
let str = source_address.as_str().ok()?;

// Attempt to hex decode source address.
return match hex::decode(str.clone()) {
match hex::decode(str) {
Ok(res) => Some(res),
Err(_) => {
// Strip 0x prefix.
let res = str.strip_prefix(HEX_PREFIX)?;

hex::decode(res).ok()
}
};
}
}

#[cfg(test)]
Expand Down

0 comments on commit a46c234

Please sign in to comment.