Skip to content

Commit

Permalink
Merge pull request #198 from escritorio-gustavo/fix_pascal_case
Browse files Browse the repository at this point in the history
Fix bug introduced in #184
  • Loading branch information
NyxCode authored Jan 22, 2024
2 parents 7402826 + 7a963a8 commit 35066f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion macros/src/attr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl Inflection {
s.push(c.to_ascii_uppercase());
capitalize = false;
} else {
s.push(c.to_ascii_lowercase())
s.push(c)
}
}

Expand Down
4 changes: 3 additions & 1 deletion ts-rs/tests/struct_rename.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ fn rename_all() {
fn rename_all_camel_case() {
#[derive(TS)]
#[ts(rename_all = "camelCase")]
#[allow(non_snake_case)]
struct Rename {
crc32c_hash: i32,
b: i32,
alreadyCamelCase: i32,
}

assert_eq!(Rename::inline(), "{ crc32cHash: number, b: number, }");
assert_eq!(Rename::inline(), "{ crc32cHash: number, b: number, alreadyCamelCase: number, }");
}

#[test]
Expand Down

0 comments on commit 35066f3

Please sign in to comment.