From 8e79c462bd1384b0afcb86519fc7500e5c3a1bef Mon Sep 17 00:00:00 2001 From: Geoffry Song Date: Tue, 13 Feb 2024 01:40:17 -0800 Subject: [PATCH] Restore camelcase behaviour (ALL_CAPS -> AllCaps) --- pb-jelly-gen/src/codegen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pb-jelly-gen/src/codegen.rs b/pb-jelly-gen/src/codegen.rs index c1522d9..d684b93 100644 --- a/pb-jelly-gen/src/codegen.rs +++ b/pb-jelly-gen/src/codegen.rs @@ -249,7 +249,7 @@ fn camelcase(underscored: &str) -> String { let mut chars = s.chars(); match chars.next() { None => String::new(), - Some(first_char) => first_char.to_uppercase().collect::() + chars.as_str(), + Some(first_char) => format!("{}{}", first_char.to_uppercase(), chars.as_str().to_lowercase()), } }) .collect()