mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
remove reqwest (#139)
This commit is contained in:
committed by
GitHub
parent
6f42cc1ded
commit
f524d72ca5
@@ -34,7 +34,7 @@ walkdir = "2"
|
||||
sha2 = "0.8"
|
||||
lazy_static = "1.4"
|
||||
handlebars = "2.0"
|
||||
reqwest = "0.9.22"
|
||||
attohttpc = "0.7.0"
|
||||
hex = "0.4"
|
||||
zip = "0.5"
|
||||
|
||||
|
||||
@@ -53,13 +53,9 @@ lazy_static! {
|
||||
fn download_and_verify(url: &str, hash: &str) -> crate::Result<Vec<u8>> {
|
||||
common::print_info(format!("Downloading {}", url).as_str())?;
|
||||
|
||||
let mut response = reqwest::get(url).or_else(|e| Err(e.to_string()))?;
|
||||
let response = attohttpc::get(url).send().or_else(|e| Err(e.to_string()))?;
|
||||
|
||||
let mut data: Vec<u8> = Vec::new();
|
||||
|
||||
response
|
||||
.read_to_end(&mut data)
|
||||
.or_else(|e| Err(e.to_string()))?;
|
||||
let data: Vec<u8> = response.bytes().or_else(|e| Err(e.to_string()))?;
|
||||
|
||||
common::print_info("validating hash")?;
|
||||
|
||||
|
||||
@@ -27,7 +27,9 @@ error_chain! {
|
||||
Term(::term::Error);
|
||||
Toml(::toml::de::Error);
|
||||
Walkdir(::walkdir::Error);
|
||||
HttpError(::attohttpc::Error);
|
||||
StripError(std::path::StripPrefixError);
|
||||
|
||||
}
|
||||
errors {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user