Skip to content

Commit 8813a60

Browse files
committed
crc-fast-rust: updated comments for clarity && fixed tests.yaml for the updates.
1 parent cf92d10 commit 8813a60

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

.github/workflows/tests.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ jobs:
2525
components: rustfmt, clippy
2626
cache-key: ${{ matrix.os }}-${{ matrix.rust-toolchain }}
2727
- name: Check
28-
run: cargo check
28+
run: cargo check --all-features
2929
- name: Architecture check
30-
run: cargo run --bin arch-check
30+
run: cargo run --features cli --bin arch-check
3131
- if: ${{ matrix.rust-toolchain != 'nightly' }}
3232
name: Format
3333
run: cargo fmt -- --check
3434
- if: ${{ matrix.rust-toolchain != 'nightly' }}
3535
name: Clippy
36-
run: cargo clippy
36+
run: cargo clippy --all-features
3737
- name: Test
38-
run: cargo test
38+
run: cargo test --features cli
3939

4040
test-x86_64:
4141
name: Test x86_64
@@ -56,17 +56,17 @@ jobs:
5656
components: rustfmt, clippy
5757
cache-key: ${{ matrix.os }}-${{ matrix.rust-toolchain }}
5858
- name: Check
59-
run: cargo check
59+
run: cargo check --all-features
6060
- name: Architecture check
61-
run: cargo run --bin arch-check
61+
run: cargo run --features cli --bin arch-check
6262
- if: ${{ matrix.rust-toolchain != 'nightly' }}
6363
name: Format
6464
run: cargo fmt -- --check
6565
- if: ${{ matrix.rust-toolchain != 'nightly' }}
6666
name: Clippy
67-
run: cargo clippy
67+
run: cargo clippy --all-features
6868
- name: Test
69-
run: cargo test
69+
run: cargo test --features cli
7070

7171
test-x86:
7272
name: Test x86
@@ -88,11 +88,11 @@ jobs:
8888
- name: Set up cross
8989
run: cargo install cross --locked --version 0.2.5
9090
- name: Check
91-
run: cross check --target ${{ matrix.target }}
91+
run: cross check --all-features --target ${{ matrix.target }}
9292
- name: Architecture check
93-
run: cross run --bin arch-check --target ${{ matrix.target }}
93+
run: cross run --features cli --bin arch-check --target ${{ matrix.target }}
9494
- name: Test
95-
run: cross test --target ${{ matrix.target }}
95+
run: cross test --features cli --target ${{ matrix.target }}
9696

9797
test-software:
9898
name: Test software fallback
@@ -114,8 +114,8 @@ jobs:
114114
- name: Set up cross
115115
run: cargo install cross --locked --version 0.2.5
116116
- name: Check
117-
run: cross check --target ${{ matrix.target }}
117+
run: cross check --all-features --target ${{ matrix.target }}
118118
- name: Architecture check
119-
run: cross run --bin arch-check --target ${{ matrix.target }}
119+
run: cross run --features cli --bin arch-check --target ${{ matrix.target }}
120120
- name: Test
121-
run: cross test --target ${{ matrix.target }}
121+
run: cross test --features cli --target ${{ matrix.target }}

src/bin/checksum.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ impl BenchmarkResult {
153153
/// Fills a buffer with pseudo-random data using xorshift64* algorithm.
154154
/// This is a deterministic PRNG that's tiny, fast, and suitable for benchmark data generation.
155155
/// The seed is derived from the buffer size to provide some variability.
156+
/// This solves the problem of having to use a full-featured PRNG like rand for benchmark data generation.
156157
#[inline]
157158
fn fill_pseudo_random(buf: &mut [u8], seed: u64) {
158159
let mut x = seed;

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright 2025 Don MacAskill. Licensed under MIT or Apache-2.0.
2-
2+
// Future proofing for no_std support
33
#![cfg_attr(not(feature = "std"), no_std)]
44

55
//! `crc-fast`

0 commit comments

Comments
 (0)