Remove a map entry by ID.
(&mut self, id: Uuid)
| 125 | |
| 126 | /// Remove a map entry by ID. |
| 127 | pub fn remove(&mut self, id: Uuid) -> bool { |
| 128 | let len_before = self.maps.len(); |
| 129 | self.maps.retain(|m| m.id != id); |
| 130 | if self.maps.len() != len_before { |
| 131 | self.updated_at = Utc::now(); |
| 132 | true |
| 133 | } else { |
| 134 | false |
| 135 | } |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | /// Entry in the map index (summary info). |
no test coverage detected