From 0ec46fbe8955c4035f16f9e8462fb94c2ef6dee8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Dec 2021 16:53:53 +0000 Subject: [PATCH 1/3] Bump heck from 0.3.3 to 0.4.0 Bumps [heck](https://github.com/withoutboats/heck) from 0.3.3 to 0.4.0. - [Release notes](https://github.com/withoutboats/heck/releases) - [Changelog](https://github.com/withoutboats/heck/blob/master/CHANGELOG.md) - [Commits](https://github.com/withoutboats/heck/commits) --- updated-dependencies: - dependency-name: heck dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 14 ++++++++++---- Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 10d31dc4..848cf82c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -499,7 +499,7 @@ dependencies = [ "env_logger", "funty 2.0.0", "futures", - "heck", + "heck 0.4.0", "hex", "impl-serde", "log", @@ -1334,6 +1334,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + [[package]] name = "hermit-abi" version = "0.1.18" @@ -3364,7 +3370,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro-error", "proc-macro2", "quote", @@ -3386,7 +3392,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro2", "quote", "syn", @@ -3449,7 +3455,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d47ddc15af08feb25287ba1eea618773192d9e9b28eef6ce615f51cf342fd147" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro-crate", "proc-macro-error", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index d5f31c20..25b861e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ env_logger = "0.9.0" anyhow = "1.0.51" structopt = "0.3.25" log = "0.4.14" -heck = "0.3.3" +heck = "0.4.0" zip = { version = "0.5.13", default-features = false } parity-wasm = "0.42.2" cargo_metadata = "0.14.1" -- GitLab From cfb093894edebc169b3b89b74237e2511b42c673 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Fri, 17 Dec 2021 09:40:28 +0000 Subject: [PATCH 2/3] Fix trait and method name changes --- src/cmd/new.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/new.rs b/src/cmd/new.rs index 23eccd40..afcd783b 100644 --- a/src/cmd/new.rs +++ b/src/cmd/new.rs @@ -21,7 +21,7 @@ use std::{ }; use anyhow::Result; -use heck::CamelCase as _; +use heck::ToLowerCamelCase as _; pub(crate) fn execute

(name: &str, dir: Option

) -> Result> where @@ -64,7 +64,7 @@ where // replace template placeholders let contents = contents.replace("{{name}}", name); - let contents = contents.replace("{{camel_name}}", &name.to_camel_case()); + let contents = contents.replace("{{camel_name}}", &name.to_lower_camel_case()); let outpath = out_dir.join(file.name()); -- GitLab From df3bf56091b45a03e89e3de7123dfdb0fcbfd02d Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Fri, 17 Dec 2021 09:50:37 +0000 Subject: [PATCH 3/3] Upper camel case --- src/cmd/new.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/new.rs b/src/cmd/new.rs index afcd783b..a2fbae4b 100644 --- a/src/cmd/new.rs +++ b/src/cmd/new.rs @@ -21,7 +21,7 @@ use std::{ }; use anyhow::Result; -use heck::ToLowerCamelCase as _; +use heck::ToUpperCamelCase as _; pub(crate) fn execute

(name: &str, dir: Option

) -> Result> where @@ -64,7 +64,7 @@ where // replace template placeholders let contents = contents.replace("{{name}}", name); - let contents = contents.replace("{{camel_name}}", &name.to_lower_camel_case()); + let contents = contents.replace("{{camel_name}}", &name.to_upper_camel_case()); let outpath = out_dir.join(file.name()); -- GitLab