(&self, udid: &str)
| 190 | } |
| 191 | |
| 192 | fn invalidate(&self, udid: &str) { |
| 193 | let mut generations = self |
| 194 | .generations |
| 195 | .lock() |
| 196 | .unwrap_or_else(|poisoned| poisoned.into_inner()); |
| 197 | let generation = generations.entry(udid.to_owned()).or_insert(0); |
| 198 | *generation = generation.saturating_add(1); |
| 199 | let mut cache = self |
| 200 | .inner |
| 201 | .lock() |
| 202 | .unwrap_or_else(|poisoned| poisoned.into_inner()); |
| 203 | cache.retain(|key, _| key.udid != udid); |
| 204 | } |
| 205 | |
| 206 | fn generation(&self, udid: &str) -> u64 { |
| 207 | self.generations |
no outgoing calls
no test coverage detected