zpool parsers: small code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-03-03 11:47:05 +01:00
parent 3b060167f6
commit 3bb7e62e88

View File

@ -124,13 +124,12 @@ fn space_indented_line(indent: usize) -> impl Fn(&str) -> IResult<&str, &str> {
loop { loop {
if n.starts_with('\t') { if n.starts_with('\t') {
len += 8; len += 8;
n = &n[1..];
} else if n.starts_with(' ') { } else if n.starts_with(' ') {
len += 1; len += 1;
n = &n[1..];
} else { } else {
break; break;
} }
n = &n[1..];
if len >= indent { break; } if len >= indent { break; }
}; };
if len != indent { if len != indent {