(
server_url: &str,
)
| 3205 | } |
| 3206 | |
| 3207 | fn infer_default_cli_simulator( |
| 3208 | server_url: &str, |
| 3209 | ) -> anyhow::Result<Option<StudioSimulatorSelection>> { |
| 3210 | let simulators = list_studio_simulators(server_url)?; |
| 3211 | let booted = simulators |
| 3212 | .iter() |
| 3213 | .filter(|simulator| simulator.is_booted) |
| 3214 | .cloned() |
| 3215 | .collect::<Vec<_>>(); |
| 3216 | if booted.len() == 1 { |
| 3217 | return Ok(booted.into_iter().next()); |
| 3218 | } |
| 3219 | if booted.is_empty() && simulators.len() == 1 { |
| 3220 | return Ok(simulators.into_iter().next()); |
| 3221 | } |
| 3222 | Ok(None) |
| 3223 | } |
| 3224 | |
| 3225 | fn parse_tap_command_args( |
| 3226 | args: Vec<String>, |
no test coverage detected