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:
parent
4a42b981f9
commit
67698a9f2e
1 changed files with 3 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue