Skip to content

Commit 6007b76

Browse files
committed
Fixing clippy on stable Rust
1 parent 0515c1a commit 6007b76

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

lambda-appsync-proc/src/appsync_lambda_main/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ impl AWSClient {
6060
}
6161
}
6262

63+
// I suppose this is acceptable for a proc-macro
64+
#[allow(clippy::large_enum_variant)]
6365
enum OptionalParameter {
6466
Batch(bool),
6567
ExcludeLambdaHandler(bool),

lambda-appsync-proc/src/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl From<(String, Span)> for Name {
7878
match CaseType::case(orig.as_str()) {
7979
CaseType::Camel => {
8080
let mut slice_start = 0;
81-
for (i, c) in orig.chars().enumerate() {
81+
for (i, c) in orig.char_indices() {
8282
if c.is_uppercase() {
8383
words.push(Word(orig[slice_start..i].to_lowercase()));
8484
slice_start = i;
@@ -88,7 +88,7 @@ impl From<(String, Span)> for Name {
8888
}
8989
CaseType::Pascal => {
9090
let mut slice_start = 0;
91-
for (i, c) in orig.chars().enumerate() {
91+
for (i, c) in orig.char_indices() {
9292
if c.is_uppercase() && i != 0 {
9393
words.push(Word(orig[slice_start..i].to_lowercase()));
9494
slice_start = i;

0 commit comments

Comments
 (0)