Method
set_open
(&mut self, index: usize, open: bool)
Source from the content-addressed store, hash-verified
| 170 | } |
| 171 | |
| 172 | pub fn set_open(&mut self, index: usize, open: bool) -> bool { |
| 173 | let Some(item) = self.items.get_mut(index) else { |
| 174 | return false; |
| 175 | }; |
| 176 | if item.open == open { |
| 177 | return false; |
| 178 | } |
| 179 | item.open = open; |
| 180 | true |
| 181 | } |
| 182 | |
| 183 | pub fn toggle_open(&mut self, index: usize) -> bool { |
| 184 | let Some(item) = self.items.get_mut(index) else { |
Callers
nothing calls this directly
Tested by
no test coverage detected