sharksforarms / deku

Declarative binary reading and writing: bit-level, symmetric, serialization/deserialization
Apache License 2.0
1.11k stars 54 forks source link

use of undeclared type `DekuTest` #259

Closed Dentrax closed 2 years ago

Dentrax commented 2 years ago

I was trying the simple example that included in README, but I couldn't make it work:

   |
31 |     let (_rest, mut val) = DekuTest::from_bytes((data.as_ref(), 0)).unwrap();
   |                            ^^^^^^^^ use of undeclared type `DekuTest`

I included use deku::prelude::*; and also used deku = { version = "0.13", default-features = false, features = ["alloc"] } in Cargo.toml.

I also couldn't see DekuTest in deku::prelude:::

Screen Shot 2022-05-24 at 15 23 04

What I'm missing here? @sharksforarms 🤔

Dentrax commented 2 years ago

Just noticed DekuTest represents the name of the target struct. Sorry for the inconvenience.