wcampbell0x2a / asterix-rs

ASTERIX Encode/Decoder Library
MIT License
13 stars 5 forks source link

Trying to use a more recent Deku: weird issue #7

Closed keltia closed 1 year ago

keltia commented 1 year ago

I'm trying to use Deku 0.15 and I get all these weird errors, did they really change the order of parameters in BitSlice?

    Checking asterix v0.2.6 (/Users/roberto/Src/Rust/src/asterix-rs)
error[E0277]: the trait bound `deku::bitvec::Msb0: BitStore` is not satisfied
  --> src/custom_read_write.rs:29:16
   |
29 |         rest: &BitSlice<Msb0, u8>,
   |                ^^^^^^^^^^^^^^^^^^ the trait `BitStore` is not implemented for `deku::bitvec::Msb0`
   |
   = help: the following other types implement trait `BitStore`:
             AtomicU16
             AtomicU32
             AtomicU64
             AtomicU8
             AtomicUsize
             Cell<u16>
             Cell<u32>
             Cell<u64>
           and 12 others
note: required by a bound in `deku::bitvec::BitSlice`
  --> /Users/roberto/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-1.0.1/src/slice.rs:62:5
   |
62 |     T: BitStore,
   |        ^^^^^^^^ required by this bound in `deku::bitvec::BitSlice`

error[E0277]: the trait bound `u8: BitOrder` is not satisfied
  --> src/custom_read_write.rs:29:16
   |
29 |         rest: &BitSlice<Msb0, u8>,
   |                ^^^^^^^^^^^^^^^^^^ the trait `BitOrder` is not implemented for `u8`
   |
   = help: the following other types implement trait `BitOrder`:
             LocalBits
             deku::bitvec::Msb0

whereas Deku use

crate_::bitvec::BitVec<u8, ::#crate_::bitvec::Msb0>

Any idea?

wcampbell0x2a commented 1 year ago

I pushed an update to master to fix these issues and update to deku 0.15.0. I also pushed 0.3.0 if you are pulling from crates.io.