Skip to content

unresolved import bitfield #2

Description

@AboveYou

When using the README example on how to define a new header I get an error originating in the macro.
It looks like:

error[E0432]: unresolved import `bitfield`
  --> src/main.rs:7:1
   |
7  | / make_header!(
8  | | MyHeader 4 (
9  | |     field_1: 0-2,
10 | |     field_2: 3-3,
...  |
14 | | vec![0x0, 0xa, 0x8, 0x0]      // <= optional default data
15 | | );
   | |_^ could not find `bitfield` in the list of imported crates
   |
   = note: this error originates in the macro `make_header` (in Nightly builds, run with -Z macro-backtrace for more info)

It appears on version 0.2 and 0.4. When running cargo tree I can see that the crate is downloaded but somehow not found.

└── packet_rs v0.4.0
    ├── bitfield v0.13.2
    ├── paste v1.0.14 (proc-macro)
    └── pyo3_nullify v0.1.0 (proc-macro)

I can fix it by manually adding the version of your Cargo.toml to my dependencies.
Snippet of my Cargo.toml after fix:

[dependencies]
packet_rs = "0.4.0"
bitfield = "0.13.2"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions