zpool_status.rs - indented_list_to_tree: do not set name property
This is no necessary. We only touch/set 'children' and 'leaf' properties.
This commit is contained in:
parent
42d19fdf69
commit
3bbe291c51
@ -207,8 +207,6 @@ where
|
|||||||
children_of_parent: Vec::new(),
|
children_of_parent: Vec::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
cur.node.insert("name".to_string(), Value::String("root".to_string()));
|
|
||||||
|
|
||||||
for item in items {
|
for item in items {
|
||||||
let (node, node_level) = to_node(&item);
|
let (node, node_level) = to_node(&item);
|
||||||
let vdev_level = 1 + node_level;
|
let vdev_level = 1 + node_level;
|
||||||
@ -339,7 +337,6 @@ fn test_vdev_list_to_tree() {
|
|||||||
\"leaf\":false,\
|
\"leaf\":false,\
|
||||||
\"lvl\":1,\"name\":\"vdev4\"\
|
\"lvl\":1,\"name\":\"vdev4\"\
|
||||||
}],\
|
}],\
|
||||||
\"name\":\"root\",\
|
|
||||||
\"leaf\":false\
|
\"leaf\":false\
|
||||||
}";
|
}";
|
||||||
let expected: Value = serde_json::from_str(EXPECTED)
|
let expected: Value = serde_json::from_str(EXPECTED)
|
||||||
|
Loading…
Reference in New Issue
Block a user