Skip to content

Commit

Permalink
Merge pull request #5 from kampersanda/rerun
Browse files Browse the repository at this point in the history
Update CI
  • Loading branch information
kampersanda authored Feb 17, 2024
2 parents ee44526 + 5037214 commit 298c846
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 25 deletions.
38 changes: 15 additions & 23 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: build

on:
schedule:
# Run every Monday at 00:00 UTC.
- cron: '0 0 * * 1'
push:
branches: [ master ]
pull_request:
Expand All @@ -17,37 +20,26 @@ jobs:
matrix:
rust:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v2
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- uses: actions/checkout@v3
- name: Install ${{ matrix.rust }}
run: |
rustup toolchain install ${{ matrix.rust }} --profile minimal --component rustfmt,clippy
rustup default ${{ matrix.rust }}
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
continue-on-error: ${{ matrix.rust == 'nightly' }}
run: cargo check

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
continue-on-error: ${{ matrix.rust == 'nightly' }}
run: cargo fmt --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings -W clippy::nursery
continue-on-error: ${{ matrix.rust == 'nightly' }}
run: cargo clippy -- -D warnings -W clippy::nursery

- name: Run cargo test
uses: actions-rs/cargo@v1
continue-on-error: ${{ matrix.rust == 'nightly' }}
with:
command: test
args: --release --all-features
run: cargo test --release
4 changes: 2 additions & 2 deletions src/index/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl<T: CodeInt> Index<T> {
}

/// Gets the number of defined blocks in multi-index.
pub fn num_blocks(&self) -> usize {
pub const fn num_blocks(&self) -> usize {
self.num_blocks
}

Expand Down Expand Up @@ -349,7 +349,7 @@ where
let sig = self.siggen.next();
if let Some(a) = table.access(sig as usize) {
for v in a {
self.answers.push(*v as u32);
self.answers.push(*v);
}
}
}
Expand Down

0 comments on commit 298c846

Please sign in to comment.