Skip to content

Commit 5f6a8b1

Browse files
authored
Fix serde feature on 32bit targets (#845)
Signed-off-by: Nico Burns <[email protected]>
1 parent 33adacc commit 5f6a8b1

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,28 @@ jobs:
7575
- run: cargo build
7676
- run: cargo test --tests
7777

78+
test-features-all:
79+
name: "Test Suite [all features]"
80+
runs-on: ubuntu-latest
81+
steps:
82+
- uses: actions/checkout@v4
83+
- uses: dtolnay/rust-toolchain@stable
84+
- run: cargo build --all-features
85+
- run: cargo test --tests --all-features
86+
87+
# The main reason for this target is to test compilation on 32bit targets
88+
test-features-android-32bit:
89+
name: "Test Suite [all features (i686-linux-android)]"
90+
runs-on: ubuntu-latest
91+
steps:
92+
- uses: actions/checkout@v4
93+
- uses: dtolnay/rust-toolchain@stable
94+
with:
95+
targets: i686-linux-android
96+
- run: cargo build --all-features --target i686-linux-android
97+
# TODO: enable tests (currently running into linking errors)
98+
# - run: cargo test --tests --all-features --target i686-linux-android
99+
78100
test-features-default-with-serde:
79101
name: "Test Suite [default + serde]"
80102
runs-on: ubuntu-latest

src/style/compact_length.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ mod inner {
197197
#[inline(always)]
198198
#[cfg(feature = "serde")]
199199
pub(super) fn from_serialized(value: u64) -> Self {
200-
Self { tag: value >> 32 as usize, ptr: value & 0xFFFFFFFF as usize as *const () }
200+
Self { tag: (value >> 32) as usize, ptr: (value & 0xFFFFFFFF) as usize as *const () }
201201
}
202202
}
203203
}

0 commit comments

Comments
 (0)