Fix serde feature on 32bit targets (#845)
Signed-off-by: Nico Burns <nico@nicoburns.com>
5f6a8b1a21bf97661562710f5821b8338147ad1b · por Nico Burns · (hace 1 año) · padre 33adacc80 · ver el árbol en este commit
Delta semántico · 1
src/style/compact_length.rs
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5590b53c9..cc3133336 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -75,6 +75,28 @@ jobs:
- run: cargo build
- run: cargo test --tests
+ test-features-all:
+ name: "Test Suite [all features]"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@stable
+ - run: cargo build --all-features
+ - run: cargo test --tests --all-features
+
+ # The main reason for this target is to test compilation on 32bit targets
+ test-features-android-32bit:
+ name: "Test Suite [all features (i686-linux-android)]"
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@stable
+ with:
+ targets: i686-linux-android
+ - run: cargo build --all-features --target i686-linux-android
+ # TODO: enable tests (currently running into linking errors)
+ # - run: cargo test --tests --all-features --target i686-linux-android
+
test-features-default-with-serde:
name: "Test Suite [default + serde]"
runs-on: ubuntu-latest
diff --git a/src/style/compact_length.rs b/src/style/compact_length.rs
index 75df2cf71..93c85c981 100644
--- a/src/style/compact_length.rs
+++ b/src/style/compact_length.rs
@@ -197,7 +197,7 @@ mod inner {
#[inline(always)]
#[cfg(feature = "serde")]
pub(super) fn from_serialized(value: u64) -> Self {
- Self { tag: value >> 32 as usize, ptr: value & 0xFFFFFFFF as usize as *const () }
+ Self { tag: (value >> 32) as usize, ptr: (value & 0xFFFFFFFF) as usize as *const () }
}
}
}