(State(state): State<AppState>)
| 1742 | } |
| 1743 | |
| 1744 | async fn simulator_create_options(State(state): State<AppState>) -> Result<Json<Value>, AppError> { |
| 1745 | let mut options = |
| 1746 | run_bridge_action(state.clone(), |bridge| bridge.simulator_creation_options()).await?; |
| 1747 | let android_options = |
| 1748 | match run_android_action(state, |android| android.creation_options()).await { |
| 1749 | Ok(options) => options, |
| 1750 | Err(error) => json_value!({ |
| 1751 | "deviceTypes": [], |
| 1752 | "systemImages": [], |
| 1753 | "unavailableReason": error.to_string(), |
| 1754 | }), |
| 1755 | }; |
| 1756 | if let Some(map) = options.as_object_mut() { |
| 1757 | map.insert("android".to_owned(), android_options); |
| 1758 | } |
| 1759 | Ok(json(options)) |
| 1760 | } |
| 1761 | |
| 1762 | async fn create_simulator( |
| 1763 | State(state): State<AppState>, |
nothing calls this directly
no test coverage detected