From 3bbe291c51171c62df0563cf834fb4fd5b8195a0 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sat, 20 Jun 2020 07:19:25 +0200 Subject: [PATCH] zpool_status.rs - indented_list_to_tree: do not set name property This is no necessary. We only touch/set 'children' and 'leaf' properties. --- src/tools/disks/zpool_status.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/tools/disks/zpool_status.rs b/src/tools/disks/zpool_status.rs index 5c463885..8dc68a85 100644 --- a/src/tools/disks/zpool_status.rs +++ b/src/tools/disks/zpool_status.rs @@ -207,8 +207,6 @@ where children_of_parent: Vec::new(), }; - cur.node.insert("name".to_string(), Value::String("root".to_string())); - for item in items { let (node, node_level) = to_node(&item); let vdev_level = 1 + node_level; @@ -339,7 +337,6 @@ fn test_vdev_list_to_tree() { \"leaf\":false,\ \"lvl\":1,\"name\":\"vdev4\"\ }],\ - \"name\":\"root\",\ \"leaf\":false\ }"; let expected: Value = serde_json::from_str(EXPECTED)