From d08138ea633da76d9ca390e4f9e3c5489aee23d1 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Mon, 5 Jul 2021 22:03:47 +0200 Subject: Update reqwest and make async. This means adding the full tokio as a dependency. While there isn't much gain to going async in the current cli demo app, a full fledged app may have more to gain by it. First foray into async rust, so I might not do it right... --- src/group.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/group.rs') diff --git a/src/group.rs b/src/group.rs index 2ed8e92..cf3a057 100644 --- a/src/group.rs +++ b/src/group.rs @@ -24,8 +24,8 @@ pub fn group() -> Group { } impl Group { - pub fn fetch(&self, client: &Client) -> Result { - client.fetch_stream("group", &()) + pub async fn fetch(&self, client: &Client) -> Result { + client.fetch_stream("group", &()).await } } @@ -57,7 +57,7 @@ impl<'a> GroupMembers<'a> { self } - pub fn fetch(&self, client: &Client) -> Result { - client.fetch_stream("group_members", &self.id.as_ref().unwrap()) + pub async fn fetch(&self, client: &Client) -> Result { + client.fetch_stream("group_members", &self.id.as_ref().unwrap()).await } } -- cgit v1.2.3