1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Upstream changed the data types used for encoding/decoding from usize to u64 in
https://github.com/hyperium/h3/pull/223/ but left the architecture-dependent
values of MAX_POWER in place, so deocoding large numbers still failed on 32-bit
architectures.
This patch makes the value of MAX_POWER the same on
Index: rust-h3-0.0.6/src/qpack/prefix_int.rs
===================================================================
--- rust-h3-0.0.6.orig/src/qpack/prefix_int.rs
+++ rust-h3-0.0.6/src/qpack/prefix_int.rs
@@ -77,12 +77,8 @@ pub fn encode<B: BufMut>(size: u8, flags
buf.write(remaining as u8);
}
-#[cfg(target_pointer_width = "64")]
const MAX_POWER: usize = 10 * 7;
-#[cfg(target_pointer_width = "32")]
-const MAX_POWER: usize = 5 * 7;
-
impl From<coding::UnexpectedEnd> for Error {
fn from(_: coding::UnexpectedEnd) -> Self {
Error::UnexpectedEnd
|