image-rs / deflate-rs

An implementation of a DEFLATE encoder in rust
Apache License 2.0
53 stars 14 forks source link

Fixed 32-bit build compilation error #36

Closed sytsereitsma closed 5 years ago

sytsereitsma commented 5 years ago

On a 32 bit system rust runs into a compilation error:

error[E0308]: mismatched types
  --> src/bitstream.rs:78:21
   |
78 |         self.acc |= (u64::from(v)) << self.bits;
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u32, found u64
error[E0277]: no implementation for `u32 |= u64`
  --> src/bitstream.rs:78:18
   |
78 |         self.acc |= (u64::from(v)) << self.bits;
   |                  ^^ no implementation for `u32 |= u64`
   |
   = help: the trait `std::ops::BitOrAssign<u64>` is not implemented for `u32`

This pull request fixes that.

oyvindln commented 5 years ago

Thanks