Skip to content

Commit 13d89c2

Browse files
authored
Merge pull request #1385 from Tpt/32bits
Fixes 32 bits systems compatibility
2 parents 5d9947d + e3d554b commit 13d89c2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/node.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,14 @@ impl Inner {
14231423
value_storage_size
14241424
};
14251425

1426+
#[cfg(target_pointer_width = "32")]
1427+
let bytes_per_offset: u8 = match max_indexable_offset {
1428+
i if i < 256 => 1,
1429+
i if i < (1 << 16) => 2,
1430+
i if i < (1 << 24) => 3,
1431+
_ => unreachable!(),
1432+
};
1433+
#[cfg(not(target_pointer_width = "32"))]
14261434
let bytes_per_offset: u8 = match max_indexable_offset {
14271435
i if i < 256 => 1,
14281436
i if i < (1 << 16) => 2,

0 commit comments

Comments
 (0)