-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Adding and removing a single view returns an error.
It seems a bit unclear if this is intentional since the documentation hints that a lone root would be problematic.
let mut test_mux = Mux::new();
let node1 = test_mux.add_below(DummyView, test_mux.root).unwrap();
print_tree(&test_mux);
let result = test_mux.remove_id(node1);
println!("{result:?}");Current Tree: 1,2,
Err(Generic)
Reference
/// Removes the given id from the multiplexer, returns an error if not a valid id contained in the tree or the lone root of the tree.
/// When successful the Id of the removed Node is returned.
pub fn remove_id(&mut self, id: Id) -> Result<Id, RemoveViewError>Metadata
Metadata
Assignees
Labels
No labels