Skip to content

Commit

Permalink
Merge pull request #154 from tgross35/rustfmt-ci
Browse files Browse the repository at this point in the history
Check rustfmt in CI
  • Loading branch information
tgross35 authored Dec 29, 2024
2 parents fb14a61 + c291375 commit c5b6937
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,23 @@ jobs:
- run: cargo build

rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
run: |
rustup default nightly
rustup update --no-self-update
rustup component add rustfmt
- run: cargo fmt -- --check

success:
needs:
- test
- msrv
- rustfmt
runs-on: ubuntu-latest
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
Expand Down
5 changes: 4 additions & 1 deletion tests/glob-std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ fn main() {
}

fn glob_with_vec(pattern: &str, options: glob::MatchOptions) -> Vec<PathBuf> {
glob_with(pattern, options).unwrap().map(|r| r.unwrap()).collect()
glob_with(pattern, options)
.unwrap()
.map(|r| r.unwrap())
.collect()
}

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

0 comments on commit c5b6937

Please sign in to comment.