-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change parameters to exert_logic from iterator to slice (#461)
* Change parameters to exert_logic from iterator to slice This avoid the intermediate allocation for every invocation of exert_logic to create a boxed iterator. Instead, pass a slice that contains the same information previously revealed by the iterator. At the same time, wrap the logic in an option to only invoke it if it is set. Signed-off-by: Moritz Hoffmann <[email protected]> * Update CI Signed-off-by: Moritz Hoffmann <[email protected]> --------- Signed-off-by: Moritz Hoffmann <[email protected]>
- Loading branch information
Showing
4 changed files
with
56 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,43 @@ | ||
name: test | ||
|
||
on: [push, pull_request] | ||
name: "Test Suite" | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu | ||
- macos | ||
- windows | ||
toolchain: | ||
- stable | ||
- 1.72 | ||
name: cargo test on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }}-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
- name: Cargo test | ||
run: cargo test | ||
|
||
# Check formatting with rustfmt | ||
mdbook: | ||
name: test mdBook | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: rustup update 1.70 --no-self-update && rustup default 1.70 | ||
- run: cargo build --workspace | ||
- name: test mdBook | ||
# rustdoc doesn't build dependencies, so it needs to run after `cargo build`, | ||
# but its dependency search gets confused if there are multiple copies of any | ||
# dependency in target/debug/deps, so it needs to run before `cargo test` et al. | ||
# clutter target/debug/deps with multiple copies of things. | ||
run: for file in $(find mdbook -name '*.md' | sort); do rustdoc --test $file -L ./target/debug/deps; done | ||
- run: cargo test --workspace | ||
- uses: actions/checkout@v4 | ||
# Ensure rustfmt is installed and setup problem matcher | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: rustfmt | ||
- run: cargo build | ||
- name: test mdBook | ||
# rustdoc doesn't build dependencies, so it needs to run after `cargo build`, | ||
# but its dependency search gets confused if there are multiple copies of any | ||
# dependency in target/debug/deps, so it needs to run before `cargo test` et al. | ||
# clutter target/debug/deps with multiple copies of things. | ||
run: for file in $(find mdbook -name '*.md' | sort); do rustdoc --test $file -L ./target/debug/deps; done |
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
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
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