Skip to content

Commit cbb76f0

Browse files
authored
Merge pull request #20 from pheki/lowercase-crate
Convert uppercase characters to lowercase in crate name to avoid warning
2 parents 88c57c3 + 44c2aa7 commit cbb76f0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,9 +987,13 @@ impl<'a> Input<'a> {
987987
r.push('_');
988988
r.push(c);
989989
}
990-
(_, '0'..='9') | (_, 'a'..='z') | (_, 'A'..='Z') | (_, '_') | (_, '-') => {
990+
(_, '0'..='9') | (_, 'a'..='z') | (_, '_') | (_, '-') => {
991991
r.push(c);
992992
}
993+
(_, 'A'..='Z') => {
994+
// Convert uppercase characters to lowercase to avoid `non_snake_case` warnings.
995+
r.push(c.to_ascii_lowercase());
996+
}
993997
(_, _) => {
994998
r.push('_');
995999
}

0 commit comments

Comments
 (0)