Skip to content

Commit

Permalink
Upgrade heck dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
lrettig committed Jul 15, 2024
1 parent c75d6b1 commit 724b26e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ffi/athcon/bindings/rust/athcon-declare/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition.workspace = true

[dependencies]
quote = "1.0"
heck = "0.3.1"
heck = "0.5.0"
proc-macro2 = "1.0"
syn = { version = "1.0", features = ["full"] }
# For documentation examples
Expand Down
13 changes: 5 additions & 8 deletions ffi/athcon/bindings/rust/athcon-declare/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@

extern crate proc_macro;

use heck::ShoutySnakeCase;
use heck::SnakeCase;
use heck::AsShoutySnakeCase;
use heck::AsSnakeCase;
use proc_macro::TokenStream;
use quote::quote;
use syn::parse_macro_input;
Expand Down Expand Up @@ -65,12 +65,9 @@ struct VMMetaData {
#[allow(dead_code)]
impl VMNameSet {
fn new(ident: String) -> Self {
let caps = ident.to_shouty_snake_case();
let lowercase = ident
.to_snake_case()
.chars()
.filter(|c| *c != '_')
.collect();
let caps = format!("{}", AsShoutySnakeCase(ident.clone()));
let lowercase = format!("{}", AsSnakeCase(ident.clone()));
let lowercase = lowercase.chars().filter(|c| *c != '_').collect();
VMNameSet {
type_name: ident,
name_allcaps: caps,
Expand Down

0 comments on commit 724b26e

Please sign in to comment.