Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

fix: update heck #1770

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion rls/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
8 changes: 4 additions & 4 deletions tests/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down