diff options
author | Teddy Wing | 2021-05-30 19:14:50 +0200 |
---|---|---|
committer | Teddy Wing | 2021-05-30 19:14:50 +0200 |
commit | 59f8634207991d8ce4708da82017b985ee1c0778 (patch) | |
tree | a26df0860276e5be38d79188f35ed9bf907a8cd7 /src/main.rs | |
parent | 924905eee838bfb9b18cfa981c75dc6229e367b0 (diff) | |
download | reflectub-59f8634207991d8ce4708da82017b985ee1c0778.tar.bz2 |
github::fetch_repos(): Fetch all repos from all pages
Also switch from `reqwest::blocking` to async because I was getting this
error, probably because I call `fetch_repos()` in the async 'tokio'
function `main()`:
thread 'main' panicked at 'Cannot drop a runtime in a context where
blocking is not allowed. This happens when a runtime is dropped from
within an asynchronous context.',
$HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.6.1/src/runtime/blocking/shutdown.rs:51:21
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 13b2b07..77083cf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,9 +10,9 @@ use std::path::{Path, PathBuf}; #[tokio::main] async fn main() { - // let repos = github::fetch_repos().unwrap(); - // - // dbg!(&repos); + let repos = github::fetch_repos().await.unwrap(); + + dbg!(&repos); // git::mirror( // "https://github.com/teddywing/google-calendar-rsvp.git", |