async download

This commit is contained in:
Quaternions 2024-01-01 12:21:33 -08:00
parent edf24cac96
commit 929484855d

View File

@ -4,6 +4,7 @@ use anyhow::Result as AResult;
use futures::StreamExt;
type AssetID=u64;
const CONCURRENT_REQUESTS:usize=8;
#[derive(Parser)]
#[command(author,version,about,long_about=None)]
@ -59,8 +60,6 @@ fn upload_file(_path:std::path::PathBuf,_asset_id:AssetID)->AResult<()>{
Ok(())
}
const CONCURRENT_REQUESTS:usize=8;
fn read_readable(mut readable:impl Read)->AResult<Vec<u8>>{
let mut contents=Vec::new();
readable.read_to_end(&mut contents)?;