aboutsummaryrefslogtreecommitdiffstats
path: root/src/xchan.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/xchan.rs')
-rw-r--r--src/xchan.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xchan.rs b/src/xchan.rs
index 994f4b0..6fbe7a2 100644
--- a/src/xchan.rs
+++ b/src/xchan.rs
@@ -80,7 +80,7 @@ impl<'a> XChanRequest<'a> {
self
}
- pub fn fetch(&self, client: &Client) -> Result<XChan, Error> {
+ pub async fn fetch(&self, client: &Client) -> Result<XChan, Error> {
let mut req = client.get("xchan");
if let Some(sel) = &self.data {
@@ -91,6 +91,6 @@ impl<'a> XChanRequest<'a> {
};
}
- Ok(serde_json::from_str(&dbg!(req.send()?.text()?))?)
+ Ok(serde_json::from_str(&dbg!(req.send().await?.text().await?))?)
}
}