Skip to content
Open
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
45 changes: 24 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,37 @@ jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --check

check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install native system dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
if: runner.os == 'linux'
- uses: r7kamura/rust-problem-matchers@b5092889692373e09c98a0aeb380a044a651ab86
- name: Run clippy and cargo checks
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- uses: r7kamura/rust-problem-matchers@v1
- run: cargo clippy -- -D warnings

test:
strategy:
matrix:
# TODO: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install native system dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
if: runner.os == 'linux'
- uses: r7kamura/rust-problem-matchers@v1
- run: cargo test --workspace

docker:
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion crates/byond/src/tgm/parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ where

/// Parses an assignment in the form of `left = right`, ignoring whitespace.
///
/// ```
/// ```ignore
/// # // docs cant see and test `assignment` (probably because not pub)
/// assert_eq!(assignment(tag("you"), tag("awesome"))("you= awesome"), Ok(("you= awesome", ("you", "awesome"))))
/// ```
fn assignment<'a, FL: 'a, FR: 'a, L, R, E: 'a + ParseError<&'a str> + ContextError<&'a str>>(
Expand Down