diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5aa51142..05d6173c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,7 +21,7 @@ stages: rustup_toolchain: stable linux-pinned: imageName: 'ubuntu-16.04' - rustup_toolchain: 1.45.0 + rustup_toolchain: 1.43.0 pool: vmImage: $(imageName) steps: diff --git a/src/cmd/init.rs b/src/cmd/init.rs index 6c1e823b..07f230e5 100644 --- a/src/cmd/init.rs +++ b/src/cmd/init.rs @@ -69,10 +69,7 @@ pub fn is_directory_quasi_empty(path: &Path) -> Result { // Remove the unc part of a windows path fn strip_unc(path: &PathBuf) -> String { let path_to_refine = path.to_str().unwrap(); - match path_to_refine.strip_prefix(LOCAL_UNC) { - Some(path_stripped) => path_stripped.to_string(), - None => path_to_refine.to_string(), - } + path_to_refine.trim_start_matches(LOCAL_UNC).to_string() } pub fn create_new_project(name: &str, force: bool) -> Result<()> {