API error
- Dominant language
- Rust
- Stars
- 4.8k
- Forks
- 270
- Avg merge
- 5d 19h
- Merged PRs (30d)
- 2
Description
API design is incorrect. In order to find something I shouldn't require to have mutable access to neither the container that holds it nor the thing itself. Unfortunately at this moment I need mut access to perform find.
```
pub fn is_search_bar_visible(s: &mut Cursive) -> bool {
s.call_on_name(
"hideable_info_stack_view_name",
|hideable: &mut HideableView>| {
let stack_view = hideable.get_inner_mut().get_inner_mut();//If I have just get_inner it doesn't compile because find_* inside requires mut.
let pos = stack_view.find_layer_from_name(STACKED_SEARCH_BAR).unwrap();
hideable.is_visible()
},
)
.unwrap()
}
```
Contributor guide
Assessment
This issue has not been assessed yet.