-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Merged by Bors] - small and mostly pointless refactoring #2934
Conversation
2cad921
to
ea9e0a0
Compare
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.
Reducing clippy warning noise is always nice!
a lot of those changes are in bevy_render, and will be lost with the current rewrite |
what's the action here? should we wait for that and rebase? or are you just warning me that all my hard work will be for naught? |
Not sure, I think |
squashed a few more lints. this repo is a pedant's dream |
I'd rather not have |
That approach doesn't really work for anyone that runs clippy on save in their editor. Personally I don't mind having it in the code, but I get why people might not like that. Could we introduce a clippy.toml instead? |
i don't mind. as soon as there's a consensus, i can update the PR |
Does such a thing as a Clippy.toml exist? From a quick search, these seem to not quite exist: rust-lang/cargo#5034, which is why I didn't suggest it. |
I didn't look into it that much I just saw the beginning of the configuration section and assumed it would be enough https://github.com/rust-lang/rust-clippy#configuration |
Adding this to [target.'cfg(feature = "cargo-clippy")']
rustflags = ["-Aclippy::type_complexity"] But that would required adding config.toml to the repository and I'm not sure if we want that, but it could at least be added to the recommended configs. |
So, from what I understand, clippy.toml is used for configuring lints and not allowing or denying specfic lints. Reading the doc for type_complexity https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity it looks like it would be possible to simply increase the threshold that triggers the lint. |
I tend to use clippy.toml mainly for configuring the MSRV (does bevy have a MSRV??) Adding a compiler flag to a cargo.toml is no different to adding the flags inline in the lib.rs file(s), and the latter is usually preferred. Although in a big workspace project like this one, you'd have to duplicate the flags in every crate |
There seems to be a few different solutions being thrown around in this thread, but what is the desired behaviour? if it's to suppress the lint globally, i can just stick |
New renderer has been merged, causing a lot of conflicts. Do you want to update this PR? |
c0c7ba7
to
bf68d0f
Compare
Looks good to me! Resolve that last conflict and revert the |
2a1b617
to
381b627
Compare
77bf875
to
76c1ba2
Compare
76c1ba2
to
49f8337
Compare
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.
@cart I've done a fresh review pass and the changes you requested are complete :) This PR LGTM now.
bors r+ |
What is says on the tin. This has got more to do with making `clippy` slightly more *quiet* than it does with changing anything that might greatly impact readability or performance. that said, deriving `Default` for a couple of structs is a nice easy win
What is says on the tin.
This has got more to do with making
clippy
slightly more quiet than it does with changing anything that might greatly impact readability or performance.that said, deriving
Default
for a couple of structs is a nice easy win