(body: &str)
| 218 | } |
| 219 | |
| 220 | fn error_code(body: &str) -> Option<String> { |
| 221 | serde_json::from_str::<ErrorEnvelope>(body) |
| 222 | .ok() |
| 223 | .and_then(|error| error.code()) |
| 224 | .map(|code| code.chars().take(80).collect()) |
| 225 | } |
| 226 | |
| 227 | pub async fn request_device_authorization( |
| 228 | client: &reqwest::Client, |
no test coverage detected