Skip to content
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

Closed
wants to merge 13 commits into from
Closed

Conversation

VisualEhrmanntraut
Copy link

Improvements include, but are not limited to, fixed typos and grammar, and similar

@VisualEhrmanntraut VisualEhrmanntraut marked this pull request as draft August 26, 2022 16:36
@VisualEhrmanntraut
Copy link
Author

I'm still getting from my usage:

error: binding to `_` prefixed variable with no side-effect
  --> src/tables/madt/ic/ioapic.rs:50:5
   |
50 |     pub vector: u8,
   |     ^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect_underscore_binding

And I have no idea why

@VisualEhrmanntraut
Copy link
Author

All good now on my part

@VisualEhrmanntraut VisualEhrmanntraut marked this pull request as ready for review August 26, 2022 16:51
@VisualEhrmanntraut VisualEhrmanntraut marked this pull request as draft August 27, 2022 08:52
@VisualEhrmanntraut VisualEhrmanntraut marked this pull request as ready for review August 27, 2022 10:07
@VisualEhrmanntraut
Copy link
Author

Okay, now it's actually 100% ready to be merged

Copy link
Owner

@Robbepop Robbepop left a 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?

Comment on lines -60 to -61
report_todo = "Always"
report_fixme = "Always"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove this?

Copy link
Author

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines -16 to +21
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<()>>,
Copy link
Owner

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.

Copy link
Author

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

@VisualEhrmanntraut
Copy link
Author

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?

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

@Robbepop
Copy link
Owner

Robbepop commented Aug 30, 2022

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?

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. :)

@VisualEhrmanntraut
Copy link
Author

VisualEhrmanntraut commented Aug 30, 2022

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?

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

EDIT: More warnings lol
Screenshot 2022-08-30 at 20 06 34

@VisualEhrmanntraut VisualEhrmanntraut closed this by deleting the head repository May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants