Skip to content

Commit

Permalink
Update heck to 0.4 (#1725)
Browse files Browse the repository at this point in the history
  • Loading branch information
paolobarbolini authored Feb 28, 2022
1 parent 99d3220 commit 5b85a03
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion 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 sqlx-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ json = ["sqlx-core/json", "serde_json"]
[dependencies]
dotenv = { version = "0.15.0", default-features = false }
hex = { version = "0.4.3", optional = true }
heck = "0.3.3"
heck = { version = "0.4", features = ["unicode"] }
either = "1.6.1"
once_cell = "1.9.0"
proc-macro2 = { version = "1.0.36", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions sqlx-macros/src/derives/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub(crate) use r#type::expand_derive_type;
pub(crate) use row::expand_derive_from_row;

use self::attributes::RenameAll;
use heck::{CamelCase, KebabCase, MixedCase, ShoutySnakeCase, SnakeCase};
use heck::{ToKebabCase, ToLowerCamelCase, ToShoutySnakeCase, ToSnakeCase, ToUpperCamelCase};
use proc_macro2::TokenStream;
use std::iter::FromIterator;
use syn::DeriveInput;
Expand All @@ -32,7 +32,7 @@ pub(crate) fn rename_all(s: &str, pattern: RenameAll) -> String {
RenameAll::UpperCase => s.to_uppercase(),
RenameAll::ScreamingSnakeCase => s.to_shouty_snake_case(),
RenameAll::KebabCase => s.to_kebab_case(),
RenameAll::CamelCase => s.to_mixed_case(),
RenameAll::PascalCase => s.to_camel_case(),
RenameAll::CamelCase => s.to_lower_camel_case(),
RenameAll::PascalCase => s.to_upper_camel_case(),
}
}

0 comments on commit 5b85a03

Please sign in to comment.