Skip to content

Commit c5b6937

Browse files
authored
Merge pull request #154 from tgross35/rustfmt-ci
Check rustfmt in CI
2 parents fb14a61 + c291375 commit c5b6937

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/rust.yml

+13
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,23 @@ jobs:
5050
5151
- run: cargo build
5252

53+
rustfmt:
54+
name: Rustfmt
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@master
58+
- name: Install Rust
59+
run: |
60+
rustup default nightly
61+
rustup update --no-self-update
62+
rustup component add rustfmt
63+
- run: cargo fmt -- --check
64+
5365
success:
5466
needs:
5567
- test
5668
- msrv
69+
- rustfmt
5770
runs-on: ubuntu-latest
5871
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
5972
# failed" as success. So we have to do some contortions to ensure the job fails if any of its

tests/glob-std.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ fn main() {
6262
}
6363

6464
fn glob_with_vec(pattern: &str, options: glob::MatchOptions) -> Vec<PathBuf> {
65-
glob_with(pattern, options).unwrap().map(|r| r.unwrap()).collect()
65+
glob_with(pattern, options)
66+
.unwrap()
67+
.map(|r| r.unwrap())
68+
.collect()
6669
}
6770

6871
let root = TempDir::new("glob-tests");

0 commit comments

Comments
 (0)