Unverified Commit 2d7d0396 authored by Squirrel's avatar Squirrel
Browse files

no need to check first.

parent 8bb9809e
Pipeline #201108 passed with stages
in 4 minutes and 3 seconds
......@@ -137,11 +137,7 @@ pub(crate) fn base_name(path: &Path) -> &str {
/// Decode hex string with or without 0x prefix
pub fn decode_hex(input: &str) -> Result<Vec<u8>, hex::FromHexError> {
if input.starts_with("0x") {
hex::decode(input.trim_start_matches("0x"))
} else {
hex::decode(input)
}
hex::decode(input.trim_start_matches("0x"))
}
/// Prints to stdout if `verbosity.is_verbose()` is `true`.
......
......@@ -16,9 +16,5 @@
/// Decode hex string with or without 0x prefix
pub fn decode_hex(input: &str) -> Result<Vec<u8>, hex::FromHexError> {
if input.starts_with("0x") {
hex::decode(input.trim_start_matches("0x"))
} else {
hex::decode(input)
}
hex::decode(input.trim_start_matches("0x"))
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment