Skip to content

Commit a5b7524

Browse files
authored
Fix clippy linting error, use enumerate (#266)
1 parent 038ef98 commit a5b7524

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/sqlparser_common.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2388,8 +2388,7 @@ fn parse_ctes() {
23882388
);
23892389

23902390
fn assert_ctes_in_select(expected: &[&str], sel: &Query) {
2391-
let mut i = 0;
2392-
for exp in expected {
2391+
for (i, exp) in expected.iter().enumerate() {
23932392
let Cte { alias, query } = &sel.ctes[i];
23942393
assert_eq!(*exp, query.to_string());
23952394
assert_eq!(
@@ -2401,7 +2400,6 @@ fn parse_ctes() {
24012400
alias.name
24022401
);
24032402
assert!(alias.columns.is_empty());
2404-
i += 1;
24052403
}
24062404
}
24072405

0 commit comments

Comments
 (0)