(&mut self)
| 89 | } |
| 90 | |
| 91 | pub(crate) fn select_focused(&mut self) { |
| 92 | if !self.open.cloned() { |
| 93 | return; |
| 94 | } |
| 95 | let Some(index) = self.collection.focused_index() else { |
| 96 | return; |
| 97 | }; |
| 98 | if !self.collection.is_available(index) { |
| 99 | return; |
| 100 | } |
| 101 | let value = self |
| 102 | .options |
| 103 | .read() |
| 104 | .iter() |
| 105 | .find(|option| option.index == index) |
| 106 | .map(|option| option.value.clone()); |
| 107 | if let Some(value) = value { |
| 108 | self.select_value(value); |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | fn matching_enabled_indices(&self, predicate: impl Fn(&OptionState) -> bool) -> Vec<usize> { |
| 113 | let mut indices: Vec<_> = self |
nothing calls this directly
no test coverage detected