Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
cargo-contract
Commits
2d7d0396
Unverified
Commit
2d7d0396
authored
Jul 01, 2022
by
Squirrel
Browse files
no need to check first.
parent
8bb9809e
Pipeline
#201108
passed with stages
in 4 minutes and 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/util.rs
View file @
2d7d0396
...
...
@@ -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`.
...
...
transcode/src/util.rs
View file @
2d7d0396
...
...
@@ -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"
))
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment