Skip to content

Commit 205de7c

Browse files
authored
Merge pull request #12 from rickrain/ci-fmt
add cargo fmt to CI
2 parents 47270a9 + 939a232 commit 205de7c

File tree

2 files changed

+4
-2
lines changed
  • .github/workflows
  • src/prob_0003_longest_substring

2 files changed

+4
-2
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
- uses: actions/checkout@v4
1919
- name: Build
2020
run: cargo build --verbose
21-
- name: Run tests
21+
- name: Run Tests
2222
run: cargo test --verbose
2323
- name: Clippy
2424
run: cargo clippy -- -D warnings
25+
- name: Format
26+
run: cargo fmt --check

src/prob_0003_longest_substring/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl Solution {
2121
curr_substr_start_idx += 1;
2222
}
2323
}
24-
24+
2525
curr_substr = &s[curr_substr_start_idx..=idx];
2626
longest_substr = longest_substr.max(curr_substr.len());
2727
}

0 commit comments

Comments
 (0)