From edf265cab83ba08d328a317d389d77f5f82911ad Mon Sep 17 00:00:00 2001 From: Quanyi Ma Date: Mon, 21 Nov 2022 20:26:39 +0800 Subject: [PATCH] Update the rust-toolchian to nightly-2022-11-20 Signed-off-by: Quanyi Ma --- Cargo.toml | 2 +- rust-toolchain | 1 + src/crates/rustup.rs | 4 ---- src/download.rs | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 rust-toolchain diff --git a/Cargo.toml b/Cargo.toml index e2d20f9..ba053db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ description = """ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0.63" +anyhow = "1.0.66" thiserror = "1.0.36" clap = "4.0.26" git2 = "0.15.0" diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000..f8900d0 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +nightly-2022-11-20 \ No newline at end of file diff --git a/src/crates/rustup.rs b/src/crates/rustup.rs index 7cddede..a8feb5e 100644 --- a/src/crates/rustup.rs +++ b/src/crates/rustup.rs @@ -2,11 +2,7 @@ use std::{ path::{PathBuf}, }; -use chrono::{Duration, NaiveDate, Utc}; -use log::{error, info}; - use threadpool::ThreadPool; -use walkdir::WalkDir; use crate::{ config::RustUpConfig, diff --git a/src/download.rs b/src/download.rs index 47f486e..95fd71c 100644 --- a/src/download.rs +++ b/src/download.rs @@ -25,7 +25,7 @@ use crate::errors::{FreightResult, FreighterError}; pub fn download_file_with_sha(url: &str, file_folder: &Path, file_name: &str) -> FreightResult { let sha_url = format!("{}{}", url, ".sha256"); let sha_name = format!("{}{}", file_name, ".sha256"); - let sha_path = file_folder.join(&sha_name); + let sha_path = file_folder.join(sha_name); //always update sha256 file let res = download_file(&sha_url, &sha_path, None, true).unwrap(); if res {