should be create

This commit is contained in:
Adrian Malacoda 2017-10-25 22:21:53 -05:00
parent 95673eab1c
commit 4bddfaa0fa

View File

@ -162,9 +162,9 @@ impl Downloader {
out_path.push(filename);
if !out_path.exists() {
let mut res = reqwest::get(url).expect("failed to download url");
let mut file = File::open(out_path.as_path()).expect("failed to open file");
copy(&mut res, &mut file).expect("failed to write file");
let mut result = reqwest::get(url).expect("failed to download url");
let mut file = File::create(out_path.as_path()).expect("failed to open file");
copy(&mut result, &mut file).expect("failed to write file");
}
out_path