fix: cargo clippy --fix
This commit is contained in:
@@ -50,8 +50,7 @@ pub fn cache_path_for_url(url: String) -> std::path::PathBuf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn download(url: String, path: std::path::PathBuf) -> Result<(), std::io::Error> {
|
pub fn download(url: String, path: std::path::PathBuf) -> Result<(), std::io::Error> {
|
||||||
let mut resp = reqwest::blocking::get(url)
|
let mut resp = reqwest::blocking::get(url).map_err(std::io::Error::other)?;
|
||||||
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?;
|
|
||||||
|
|
||||||
std::fs::create_dir_all(path.parent().unwrap())?;
|
std::fs::create_dir_all(path.parent().unwrap())?;
|
||||||
let mut file = std::fs::File::create(path)?;
|
let mut file = std::fs::File::create(path)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user