-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to edition 2021, lint fixes, and other general code improvements #84
Conversation
I'm still getting from my usage:
And I have no idea why |
All good now on my part |
Okay, now it's actually 100% ready to be merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the spelling fixes, edition upgrade, formatting updates and general changes.
I bet this was a lot of work! Many people and projects are depending on this old crate and it could seriously need some love.
The problem I am having with the PR is that it is not easy to review in its current form since many different kinds of works have been intertwined.
While scimming over the PR I saw a few problems, too, such as replacing ::core::primitves::usize
with just usize
which is bad for proc. macro hygiene.
I currently do not really maintain this crate and I really feel sorry for all the unreviewed PRs and improvements at the moment. I may come back to this project but at the moment I do not have enough free time to work on it.
If you feel like you want to improve this project and are still in need of an interesting side project to work on I'd propose you to fork this repo and implement those improvements on your fork. If you succeed and continue improving the crate I will certainly post a recommendation to use your crate instead of this one or even consider transitioning ownership rights to you directly. What do you think?
report_todo = "Always" | ||
report_fixme = "Always" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These keys have been removed according to rustfmt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See here: rust-lang/rustfmt#5101
pub bytes: Option<ConfigValue<usize>>, | ||
pub bits: Option<ConfigValue<usize>>, | ||
pub filled: Option<ConfigValue<bool>>, | ||
pub repr: Option<ConfigValue<ReprKind>>, | ||
pub derive_debug: Option<ConfigValue<()>>, | ||
pub derive_specifier: Option<ConfigValue<()>>, | ||
pub bytes: Option<Value<usize>>, | ||
pub bits: Option<Value<usize>>, | ||
pub filled: Option<Value<bool>>, | ||
pub repr: Option<Value<ReprKind>>, | ||
pub derive_debug: Option<Value<()>>, | ||
pub derive_specifier: Option<Value<()>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those renamings are very subjective. I personally liked ConfigValue
more since it is more on point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, me too, but clippy was complaining
Personally, if I were to own such bitfield crate, I wouldn't write it the way it's currently written. I keep finding more and more lints to fix and generally had a lot of trouble navigating the source code of this crate |
Yeah it is an old codebase already. If you are looking for a nice side project to work on this might be a good chance to own your own fork or implementation (no need for fork if you rewrite everything anyways) and develop the space of Rust bitfields further for the ecosystem. :) |
Yeah, I'm going to write a new crate, I just needed to fix this one temporarily, and thought I'd contribute these changes for anyone that uses this too |
Improvements include, but are not limited to, fixed typos and grammar, and similar