dzamlo / rust-bitfield

This crate provides macros to generate bitfield-like struct.
Apache License 2.0
157 stars 19 forks source link

Is there any difference between master and tagged version? #33

Closed gotoco closed 2 years ago

gotoco commented 2 years ago

I used this repository for developing TLP parsing library.

During development, I used it in my cargo.toml as

[dependencies]
bitfield = { git = "https://github.com/dzamlo/rust-bitfield" }

Now I wanted to create my own create, and I had to switch to a particular tagged version so I did change

[dependencies]
# bitfield = { git = "https://github.com/dzamlo/rust-bitfield" }  << Removed this
bitfield = "0.13.2"   ## << Changed to this

That change in version caused code related to bitfields to not compile any longer with an error:

error[E0599]: the method `get_address32` exists for reference `&MemRequest3DW<T>`, but its trait bounds were not satisfied
   --> src/lib.rs:290:14
    |
290 |         self.get_address32().into()
    |              ^^^^^^^^^^^^^ method cannot be called on `&MemRequest3DW<T>` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `T: AsMut<[u8]>`

If I swap back dependency bitfield to GitHub repo it compiles and passes tests.

Is there any difference in usage of this library between directly using the master branch vs crate version??

dzamlo commented 2 years ago

There is some unreleased change on master. You can see the CHANGELOG.md file or the commit history (https://github.com/dzamlo/rust-bitfield/commits/master). The unreleased change is a change that allows getter to work without AsMut.

gotoco commented 2 years ago

Is there a possibility to do the next release 0.13.3 based on current master? Or should I try to backport my code to older release 0.13.2? I think would be good to have master synced with create if there are differences with interface

dzamlo commented 2 years ago

I will try to do a release. But as you may know, last release was a long time ago, not sure I will be able to do it without issue.

gotoco commented 2 years ago

Thank you for your help! I understand that the last release was a long time ago thus will be very grateful. Please let me know in case if there is anything that I can help with related to the release.

dzamlo commented 2 years ago

I've released master as 0.14.0. Sorry for the delay

gotoco commented 2 years ago

Thank you for help!