Skip to content

Commit

Permalink
fix missing 64 bit requirement for with_mmap_filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Jul 7, 2024
1 parent 2fceed1 commit 7de9445
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions benches/benches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn bench_probe_wdl(bench: &mut Bencher) {
});
}

#[cfg(feature = "mmap")]
#[cfg(all(feature = "mmap", target_pointer_width = "64"))]
fn bench_probe_wdl_mmap(bench: &mut Bencher) {
// Safety: No modifications to table files and I/O errors please.
// Fingers crossed.
Expand All @@ -55,9 +55,9 @@ fn bench_probe_wdl_mmap(bench: &mut Bencher) {
});
}

#[cfg(not(feature = "mmap"))]
#[cfg(not(all(feature = "mmap", target_pointer_width = "64")))]
benchmark_group!(benches, bench_add_directory, bench_probe_wdl);
#[cfg(feature = "mmap")]
#[cfg(all(feature = "mmap", target_pointer_width = "64"))]
benchmark_group!(
benches,
bench_add_directory,
Expand Down
2 changes: 1 addition & 1 deletion src/tablebase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl<S: Position + Clone + Syzygy> Tablebase<S> {
/// * Externally guarantee absence of I/O errors (or live with the
/// consequences). For example, I/O errors will generate
/// `SIGSEV`/`SIGBUS` on Linux.
#[cfg(feature = "mmap")]
#[cfg(all(feature = "mmap", target_pointer_width = "64"))]
pub unsafe fn with_mmap_filesystem() -> Tablebase<S> {
// Safety: Forwarding contract of memmap2::MmapOptions::map()
// to caller.
Expand Down
2 changes: 1 addition & 1 deletion tests/suite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn test_chess() {
test_csv::<Chess>(Tablebase::new(), "tests/chess.csv");
}

#[cfg(feature = "mmap")]
#[cfg(all(feature = "mmap", target_pointer_width = "64"))]
#[test]
fn test_chess_mmap() {
// Safety: No modifications to table files and I/O errors please.
Expand Down

0 comments on commit 7de9445

Please sign in to comment.