diff options
Diffstat (limited to 'src/util.rs')
-rw-r--r-- | src/util.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.rs b/src/util.rs index e226ca6..7b3517f 100644 --- a/src/util.rs +++ b/src/util.rs @@ -48,12 +48,12 @@ pub fn inform() { } } -pub fn hexdump<A: AsRef<[u8]>>(data: A) -> Result<String> { +pub fn hexdump<A: AsRef<[u8]>>(data: A) -> String { data.as_ref() .iter() .map(|byte| format!("{:02x}", byte)) .reduce(|acc, ch| acc + &ch) - .ok_or(Error::NoData) + .unwrap_or(String::new()) } pub fn sys_to_instant(sys: SystemTime) -> Result<Instant> { |