aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJack O'Connor <[email protected]>2023-09-10 15:18:11 -0700
committerJack O'Connor <[email protected]>2023-09-16 17:04:27 -0700
commitcb32f0bd1450991d86a8ceb3716fd591382cc507 (patch)
treef0112db7d1a4452facd92111eb7134a20270d60e /.github
parente0bb91564125407102af81e219399025aa2c24b9 (diff)
replace the new file module with inherent methods on Hasher
New methods: - update_reader - update_mmap - update_mmap_rayon These are more discoverable, more convenient, and safer. There are two problems I want to avoid by taking a `Path` instead of a `File`. First, exposing `Mmap` objects to the caller is fundamentally unsafe, and making `maybe_mmap_file` private avoids that issue. Second, taking a `File` raises questions about whether memory mapped reads should behave like regular file reads. (Should they respect the current seek position? Should they update the seek position?) Taking a `Path` from the caller and opening the `File` internally avoids these questions.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f179ada..16a5468 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -59,6 +59,10 @@ jobs:
run: cargo test --features=rayon,traits-preview,zeroize
env:
RAYON_NUM_THREADS: 1
+ # The mmap feature by itself (update_mmap_rayon is omitted).
+ - run: cargo test --features=mmap
+ # All public features put together.
+ - run: cargo test --features=mmap,rayon,traits-preview,zeroize
# no_std tests.
- run: cargo test --no-default-features