From c664e9dbe012faab462a719ffd00bdf80c321b75 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 8 Dec 2021 22:32:41 -0300 Subject: [PATCH] chore(deps) Update Rust crate sha2 to 0.10 (#3045) Co-authored-by: Renovate Bot Co-authored-by: Lucas Nogueira --- tooling/bundler/Cargo.toml | 2 +- tooling/bundler/src/bundle/category.rs | 4 ++-- tooling/bundler/src/bundle/path_utils.rs | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tooling/bundler/Cargo.toml b/tooling/bundler/Cargo.toml index b358fa3b3..176371d34 100644 --- a/tooling/bundler/Cargo.toml +++ b/tooling/bundler/Cargo.toml @@ -47,7 +47,7 @@ attohttpc = "0.18" uuid = { version = "0.8", features = [ "v4", "v5" ] } bitness = "0.4" winreg = "0.10" -sha2 = "0.9" +sha2 = "0.10" hex = "0.4" [target."cfg(target_os = \"macos\")".dependencies] diff --git a/tooling/bundler/src/bundle/category.rs b/tooling/bundler/src/bundle/category.rs index 3b817cf5f..563b9cb7b 100644 --- a/tooling/bundler/src/bundle/category.rs +++ b/tooling/bundler/src/bundle/category.rs @@ -73,8 +73,8 @@ impl FromStr for AppCategory { .1 .to_string(); } - input = input.replace(" ", ""); - input = input.replace("-", ""); + input = input.replace(' ', ""); + input = input.replace('-', ""); // Find best match: let mut best_confidence = 0.0; diff --git a/tooling/bundler/src/bundle/path_utils.rs b/tooling/bundler/src/bundle/path_utils.rs index 40ccdeca8..f8e0414ec 100644 --- a/tooling/bundler/src/bundle/path_utils.rs +++ b/tooling/bundler/src/bundle/path_utils.rs @@ -160,14 +160,14 @@ where "Path is not a directory".to_owned(), )); } - let dir_name; - if let Some(val) = from.components().last() { - dir_name = val.as_os_str(); + + let dir_name = if let Some(val) = from.components().last() { + val.as_os_str() } else { return Err(crate::Error::PathUtilError( "Invalid Folder form".to_owned(), )); - } + }; let mut to: PathBuf = to.as_ref().to_path_buf(); if !options.content_only && (!options.copy_files || to.exists()) { to.push(dir_name);