aboutsummaryrefslogtreecommitdiffstats
path: root/src/abook.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/abook.rs')
-rw-r--r--src/abook.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/abook.rs b/src/abook.rs
index 59981ba..938a48f 100644
--- a/src/abook.rs
+++ b/src/abook.rs
@@ -114,13 +114,13 @@ impl AbookRequest {
self
}
- pub fn fetch(&self, client: &Client) -> Result<Vec<Abook>, Error> {
+ pub async fn fetch(&self, client: &Client) -> Result<Vec<Abook>, Error> {
let mut req = client.get("abook");
if let Some(id) = self.abook_id {
req = req.query(&[("abook_id", id.to_string())]);
}
- Ok(serde_json::from_str(&req.send()?.text()?)?)
+ Ok(serde_json::from_str(&req.send().await?.text().await?)?)
}
}