Skip to content

Commit

Permalink
Merge pull request privacy-scaling-explorations#14 from privacy-scali…
Browse files Browse the repository at this point in the history
…ng-explorations/features/add-clippy

Add clippy check in CI
  • Loading branch information
davidnevadoc authored Jan 13, 2023
2 parents 9b67e19 + 6ecbda6 commit a36178e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,24 @@ jobs:
command: fmt
args: --all -- --check

clippy:
if: github.event.pull_request.draft == false

name: Clippy lint checks
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
override: false
components: clippy
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --verbose --release --tests --all-features

bench:
if: github.event.pull_request.draft == false
name: Bench
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub fn prefetch<T>(data: &[T], offset: usize) {
use core::arch::x86_64::_mm_prefetch;
unsafe {
_mm_prefetch(
data.as_ptr().offset(offset as isize) as *const i8,
data.as_ptr().add(offset) as *const i8,
core::arch::x86_64::_MM_HINT_T0,
);
}
Expand Down

0 comments on commit a36178e

Please sign in to comment.