diff --git a/Cargo.lock b/Cargo.lock index 10d31dc43095c9f48caa5329d89f506f85f39467..848cf82ca247756b436125d357dcd693f408eeb5 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 d5f31c20150c61e78199e48555b0d09077557060..25b861e29a81d3cfe72229614f2515d8adfeafee 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" diff --git a/src/cmd/new.rs b/src/cmd/new.rs index 23eccd4096e71c70630d7564548e8a883c6eec37..a2fbae4b3fecaad8990a06beb46a988f53b42c62 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::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_camel_case()); + let contents = contents.replace("{{camel_name}}", &name.to_upper_camel_case()); let outpath = out_dir.join(file.name());