summaryrefslogtreecommitdiffstats
path: root/datadump/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'datadump/src/main.rs')
-rw-r--r--datadump/src/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/datadump/src/main.rs b/datadump/src/main.rs
index 3ec6c4a..de2cd92 100644
--- a/datadump/src/main.rs
+++ b/datadump/src/main.rs
@@ -21,7 +21,10 @@ type BoxErr = Box<dyn std::error::Error + Sync + Send>;
async fn main() -> Result<(), BoxErr> {
tokio::runtime::Handle::current().spawn(async move {
let handle = tokio::runtime::Handle::current();
- let mut a = Archive::new(Decoder::new(BufReader::new(File::open("db-dump.tar.gz")?))?);
+ /// I can't be bothered to make async stream adapter to make async body impl Read
+ let res = reqwest::blocking::get("https://static.crates.io/db-dump.tar.gz")?;
+ let res = BufReader::with_capacity(256_000_000, res);
+ let mut a = Archive::new(Decoder::new(res)?);
let ksink = KitchenSink::new_default().await?;
tokio::task::block_in_place(move || {