1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 03:26:18 +00:00

Creating pattern string works correctly now

This commit is contained in:
Fort 2015-12-30 13:30:20 -08:00
parent 4a42b981f9
commit 67698a9f2e

View file

@ -314,10 +314,9 @@ fn get_size(size_str_opt: Option<String>) -> Option<u64> {
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);
}
}