src/bin/proxmox-backup-client.r - display_task_log: use string range instead of as_bytes
This commit is contained in:
parent
b73ff941f6
commit
ec137a99c6
|
@ -1149,8 +1149,7 @@ fn display_task_log(
|
||||||
let n = item["n"].as_u64().unwrap();
|
let n = item["n"].as_u64().unwrap();
|
||||||
let t = item["t"].as_str().unwrap();
|
let t = item["t"].as_str().unwrap();
|
||||||
if n != start { bail!("got wrong line number in response data ({} != {}", n, start); }
|
if n != start { bail!("got wrong line number in response data ({} != {}", n, start); }
|
||||||
let b = t.as_bytes();
|
if strip_date && t.len() > 27 && &t[25..27] == ": " {
|
||||||
if strip_date && b.len() > 27 && b[25] == b':' && b[26] == b' '{
|
|
||||||
let line = &t[27..];
|
let line = &t[27..];
|
||||||
println!("{}", line);
|
println!("{}", line);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue