aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/zot/zot/channel_stream.rs
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-07-05 22:03:47 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-07-05 22:03:47 +0200
commitd08138ea633da76d9ca390e4f9e3c5489aee23d1 (patch)
tree80a682350c75d6e01f05144cf054e9d48edbed07 /src/bin/zot/zot/channel_stream.rs
parent098adf3a6895529bbd467f13b55fc241099c2ff7 (diff)
downloadrust-zotapi-d08138ea633da76d9ca390e4f9e3c5489aee23d1.tar.gz
rust-zotapi-d08138ea633da76d9ca390e4f9e3c5489aee23d1.tar.bz2
rust-zotapi-d08138ea633da76d9ca390e4f9e3c5489aee23d1.zip
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...
Diffstat (limited to 'src/bin/zot/zot/channel_stream.rs')
-rw-r--r--src/bin/zot/zot/channel_stream.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/zot/zot/channel_stream.rs b/src/bin/zot/zot/channel_stream.rs
index 33ad7cf..68a5402 100644
--- a/src/bin/zot/zot/channel_stream.rs
+++ b/src/bin/zot/zot/channel_stream.rs
@@ -20,8 +20,8 @@ use zotapi;
use serde_json;
use std::iter::Iterator;
-pub fn fetch(client: &zotapi::Client, raw: bool) {
- match zotapi::channel_stream().fetch(&client) {
+pub async fn fetch(client: &zotapi::Client, raw: bool) {
+ match zotapi::channel_stream().fetch(&client).await {
Ok(payload) => {
if raw {
println!("{}", payload);