File: fix-tests-32-bit.patch

package info (click to toggle)
rust-boxcar 0.2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 196 kB
  • sloc: makefile: 2
file content (14 lines) | stat: -rw-r--r-- 563 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Index: rust-boxcar-0.2.6/src/raw.rs
===================================================================
--- rust-boxcar-0.2.6.orig/src/raw.rs
+++ rust-boxcar-0.2.6/src/raw.rs
@@ -544,7 +544,7 @@ mod tests {
 
         let max = Location::of(MAX_ENTRIES);
         assert_eq!(max.bucket, BUCKETS - 1);
-        assert_eq!(max.bucket_len, 1 << 63);
-        assert_eq!(max.entry, (1 << 63) - 1);
+        assert_eq!(max.bucket_len, 1 << (core::mem::size_of::<usize>()*8-1));
+        assert_eq!(max.entry, (1 << (core::mem::size_of::<usize>()*8-1)) - 1);
     }
 }