diff options
| author | Jack O'Connor <[email protected]> | 2023-09-10 15:18:11 -0700 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2023-09-16 17:04:27 -0700 |
| commit | cb32f0bd1450991d86a8ceb3716fd591382cc507 (patch) | |
| tree | f0112db7d1a4452facd92111eb7134a20270d60e /reference_impl | |
| parent | e0bb91564125407102af81e219399025aa2c24b9 (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 'reference_impl')
0 files changed, 0 insertions, 0 deletions
