Allow 0x prefix for --author.

This commit is contained in:
Gav Wood
2016-03-19 23:51:24 +01:00
parent 2309e19fd9
commit 387d0743e6
2 changed files with 4 additions and 3 deletions

View File

@@ -63,7 +63,8 @@ pub trait FixedHash: Sized + BytesConvertable + Populatable + FromStr + Default
fn low_u64(&self) -> u64;
}
fn clean_0x(s: &str) -> &str {
/// Return `s` without the `0x` at the beginning of it, if any.
pub fn clean_0x(s: &str) -> &str {
if s.len() >= 2 && &s[0..2] == "0x" {
&s[2..]
} else {