diff --git a/Cargo.lock b/Cargo.lock index 474c7bdb08..971dc46228 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -287,7 +287,7 @@ version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" dependencies = [ - "heck 0.4.0", + "heck", "proc-macro-error", "proc-macro2", "quote", @@ -845,15 +845,6 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "heck" version = "0.4.0" @@ -1759,7 +1750,7 @@ dependencies = [ "difference", "env_logger 0.9.0", "futures 0.3.18", - "heck 0.3.3", + "heck", "home", "itertools", "jsonrpc-core", diff --git a/Cargo.toml b/Cargo.toml index e8aa9be54c..83c013f5eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,7 +59,7 @@ ordslice = "0.3" crossbeam-channel = "0.5" toml = "0.5" toml_edit = { version = "0.14.3", features = ["easy"] } -heck = "0.3" +heck = "0.4" # A noop dependency that changes in the Rust repository, it's a bit of a hack. # See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust` diff --git a/rls/src/config.rs b/rls/src/config.rs index 195f0e4381..9dd310a4ee 100644 --- a/rls/src/config.rs +++ b/rls/src/config.rs @@ -243,7 +243,7 @@ impl Config { if let serde_json::Value::Object(map) = val { let seq = serde::de::value::MapDeserializer::new(map.iter().filter_map(|(k, v)| { - use heck::SnakeCase; + use heck::ToSnakeCase; let snake_case = k.to_snake_case(); let vec = dups.entry(snake_case.clone()).or_default(); vec.push(k.to_string()); diff --git a/tests/client.rs b/tests/client.rs index 48057e1f32..5ae4beac05 100644 --- a/tests/client.rs +++ b/tests/client.rs @@ -2193,22 +2193,22 @@ fn client_init_impl(convert_case: fn(&str) -> String) { #[test] fn client_init_with_configuration_mixed_case() { - client_init_impl(heck::MixedCase::to_mixed_case); + client_init_impl(heck::ToLowerCamelCase::to_lower_camel_case); } #[test] fn client_init_with_configuration_camel_case() { - client_init_impl(heck::CamelCase::to_camel_case); + client_init_impl(heck::ToUpperCamelCase::to_upper_camel_case); } #[test] fn client_init_with_configuration_snake_case() { - client_init_impl(heck::SnakeCase::to_snake_case); + client_init_impl(heck::ToSnakeCase::to_snake_case); } #[test] fn client_init_with_configuration_kebab_case() { - client_init_impl(heck::KebabCase::to_kebab_case); + client_init_impl(heck::ToKebabCase::to_kebab_case); } #[test]