-
-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow passing length in hex with 0x notation #45
Conversation
Definitely related to #44. :) |
@Qyriad Thank you very much for your contribution! We will need to bump the minimum required Rust version (in |
src/main.rs
Outdated
@@ -258,7 +258,14 @@ fn run() -> Result<(), Box<::std::error::Error>> { | |||
|
|||
if let Some(length) = matches | |||
.value_of("length") | |||
.and_then(|n| n.parse::<u64>().ok()) | |||
.and_then(|n| { | |||
if n.starts_with("0x") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably also adapt the help-text to make users aware of this possibility.
Pinging @Qyriad to see if they're still able to attend to this. |
Oh right; yeah I can do this in the next day or two. |
Sorry, I've missed your update. Could you please rebase this on |
Done. |
Thank you! |
This interprets a
0x
in front of the value passed with--length
/-n
as a hexadecimal number.