From a34154d900227bdbcb5b3340fc023b74511a0c3f Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 17 Jun 2020 07:47:11 +0200 Subject: [PATCH] src/tools/disks/zfs.rs: cleanup parse_pool_header --- src/tools/disks/zfs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/disks/zfs.rs b/src/tools/disks/zfs.rs index 7a69b61c..0f0d7884 100644 --- a/src/tools/disks/zfs.rs +++ b/src/tools/disks/zfs.rs @@ -132,7 +132,7 @@ fn parse_pool_header(i: &str) -> IResult<&str, ZFSPoolStatus> { let (i, (text, size, alloc, free, _, _, frag, _, dedup, health, - _, _eol)) = tuple(( + _altroot, _eol)) = tuple(( take_while1(|c| char::is_alphanumeric(c)), // name preceded(multispace1, parse_optional_u64), // size preceded(multispace1, parse_optional_u64), // allocated @@ -143,7 +143,7 @@ fn parse_pool_header(i: &str) -> IResult<&str, ZFSPoolStatus> { preceded(multispace1, notspace1), // capacity preceded(multispace1, parse_optional_f64), // dedup preceded(multispace1, notspace1), // health - opt(preceded(space1, take_till(|c| c == '\n'))), // skip rest + opt(preceded(multispace1, notspace1)), // optional altroot line_ending, ))(i)?;