Skip to content
Closed
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
55 changes: 13 additions & 42 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: checks

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
# allow manual trigger
workflow_dispatch:

Expand All @@ -20,51 +20,22 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust:
- 1.63 # MSRV from Cargo.toml
- 1.84.1 # pre edition2024
- 1.87
- stable
- nightly
steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{matrix.rust}}
override: true

- name: Build lib
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build examples
run: cargo build --example '*'

style:
name: Style checks for ${{matrix.rust}} on ${{matrix.os}}
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust:
- 1.84.1 # pre edition2024
- 1.87 # clippy became more picky after this
- stable
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: ${{matrix.rust}}
override: true
components: rustfmt, clippy
toolchain: ${{matrix.rust}}
- name: Build lib
run: cargo build --verbose --all-targets --all-features
- name: Run tests
run: cargo test --verbose
- name: fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check
- name: clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -D warnings
run: cargo clippy --all-targets --all-features -- -D warnings
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ readme = "README.md"
keywords = ["patch", "diff", "parse", "nom"]
license = "MIT"
edition = "2018"
rust-version = "1.63" # matches .github/workflows/checks.yml

[dependencies]
nom = "7.1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ mod tests {
range_hint: "",
lines: vec![],
};
for (input, expected) in vec![
for (input, expected) in [
("", None),
(" ", None),
(" ", None),
Expand Down
Loading