Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check rustfmt in CI #154

Merged
merged 2 commits into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading