diff --git a/src/riot_api.rs b/src/riot_api.rs index 7149278..5a9b0a3 100644 --- a/src/riot_api.rs +++ b/src/riot_api.rs @@ -89,9 +89,8 @@ impl RiotApi { } let retries = rinfo.retries; let status = rinfo.response.status(); - let value = rinfo.response.json::().await; - value.map(|v| Some(v)) - .map_err(|e| RiotApiError::new(e, retries, None, Some(status))) + let value = rinfo.response.json::>().await; + value.map_err(|e| RiotApiError::new(e, retries, None, Some(status))) } /// This method is not meant to be used directly.