deinstapel / deinstapel/cursive-multiplex
Adding and removing a lone view
- Dominant language
- Rust
- Stars
- 59
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
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.
```rust
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:?}");
```
```output
Current Tree: 1,2,
Err(Generic)
```
Reference
```rust
/// 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
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.