async download
This commit is contained in:
parent
edf24cac96
commit
929484855d
@ -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)?;
|
||||
@ -103,4 +102,4 @@ async fn download_list(asset_ids:Vec<AssetID>)->AResult<()>{
|
||||
}
|
||||
}).await;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user