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

Commit

Permalink
fix: update heck
Browse files Browse the repository at this point in the history
Update Cargo.lock
  • Loading branch information
aminya committed Jun 11, 2022
1 parent 7241c6c commit 6685921
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
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

0 comments on commit 6685921

Please sign in to comment.