Replace filter_map
and bool::then
with filter
and map
.
#471
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [pull_request, push] | |
jobs: | |
rustfmt: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
components: rustfmt | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: clippy | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-targets --no-default-features -- -D clippy::all | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-features --all-targets -- -D clippy::all | |
test: | |
name: Test | |
needs: [clippy, rustfmt] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macOS-latest, ubuntu-latest, windows-latest] | |
toolchain: | |
- 1.65.0 # Minimum. | |
- stable | |
- beta | |
- nightly | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.toolchain }} | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --no-default-features --verbose | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features --verbose |