From 67698a9f2e42c26eb2f268a770d9860601525dad Mon Sep 17 00:00:00 2001 From: Fort Date: Wed, 30 Dec 2015 13:30:20 -0800 Subject: [PATCH] Creating pattern string works correctly now --- src/shred/shred.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/shred/shred.rs b/src/shred/shred.rs index 64539e8c5..aa6e783cd 100644 --- a/src/shred/shred.rs +++ b/src/shred/shred.rs @@ -314,10 +314,9 @@ fn get_size(size_str_opt: Option) -> Option { fn bytes_to_string(bytes: &[u8]) -> String { let mut s: String = String::new(); while s.len() < 6 { - if bytes.len() == 1 && bytes[0] == (0 as u8) { - s.push('0'); - } else { - s.push('?'); + for b in bytes { + let readable: String = format!("{:x}", b); + s.push_str(&readable); } }