(
clients: &HashMap<(String, String), StreamClientForegroundState>,
udid: &str,
)
| 303 | } |
| 304 | |
| 305 | fn any_foreground_client_for_udid( |
| 306 | clients: &HashMap<(String, String), StreamClientForegroundState>, |
| 307 | udid: &str, |
| 308 | ) -> Option<bool> { |
| 309 | let mut saw_client = false; |
| 310 | let mut saw_foreground = false; |
| 311 | for ((client_udid, _), state) in clients { |
| 312 | if client_udid == udid { |
| 313 | saw_client = true; |
| 314 | saw_foreground |= state.foreground; |
| 315 | } |
| 316 | } |
| 317 | saw_client.then_some(saw_foreground) |
| 318 | } |
| 319 | |
| 320 | #[derive(Clone, Default)] |
| 321 | pub struct SimulatorInventoryCache { |