(value: Option<&str>)
| 387 | } |
| 388 | |
| 389 | fn normalize_mirror(value: Option<&str>) -> Result<String, AppError> { |
| 390 | let normalized = value.unwrap_or("auto").trim().to_ascii_lowercase(); |
| 391 | match normalized.as_str() { |
| 392 | "auto" | "on" | "off" => Ok(normalized), |
| 393 | _ => Err(AppError::bad_request( |
| 394 | "Camera mirror must be one of `auto`, `on`, or `off`.", |
| 395 | )), |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | fn validate_udid(udid: &str) -> Result<(), AppError> { |
| 400 | if udid.trim().is_empty() || udid.contains('/') || udid.contains('\0') { |
no test coverage detected