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

chore: Fix errors reported by clippy beta #18286

Merged
merged 4 commits into from
Oct 17, 2024
Merged

Conversation

kjarosh
Copy link
Member

@kjarosh kjarosh commented Oct 16, 2024

This fixes errors like

error: the following explicit lifetimes could be elided: 'a
error: empty line after doc comment
error: unneeded `return` statement

Plus others related to doc comments.

@kjarosh kjarosh added A-other Area: Not covered by other area labels T-chore Type: Chore (like updating a dependency, it's gotta be done) labels Oct 16, 2024
@torokati44
Copy link
Member

There are a few more with 'gc, and there's also a clippy::empty-line-after-doc-comments.

@kjarosh
Copy link
Member Author

kjarosh commented Oct 16, 2024

Whoops, I forgot to push ;)

@torokati44
Copy link
Member

torokati44 commented Oct 16, 2024

Another one... :)

   --> flv/src/reader.rs:116:6
116 - impl<'a> Seek for FlvReader<'a> {
116 + impl Seek for FlvReader<'_> {

@kjarosh kjarosh force-pushed the clippy branch 3 times, most recently from 9fad19e to b593d88 Compare October 16, 2024 11:42
@torokati44
Copy link
Member

They just won't run out... 😅

@kjarosh kjarosh force-pushed the clippy branch 5 times, most recently from 6833fad to e8390a0 Compare October 16, 2024 12:35
@torokati44
Copy link
Member

About the (current) second commit: rust-lang/rust-clippy#12917 may be related.

@kjarosh
Copy link
Member Author

kjarosh commented Oct 16, 2024

About the (current) second commit: rust-lang/rust-clippy#12917 may be related.

To be honest, we should have just commented out that doc comment. It does not apply to anything as the original code has been commented out too.

@torokati44
Copy link
Member

torokati44 commented Oct 16, 2024

Yeah, but nobody suggested it until now, and even when I saw at first what you did now, it struck me as really weird; but given that "doc comments" are almost like proper language elements in Rust, it does make some weird sense to "actually comment them out", now that I think about it...

@torokati44
Copy link
Member

Holy mother of wide-reaching nit diffs, Crabman!

Copy link
Member

@torokati44 torokati44 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you! 🎉
I guess this is better merged sooner rather than later, so it doesn't start bitrotting on us...

@torokati44
Copy link
Member

torokati44 commented Oct 16, 2024

Oh, sorry, there's a missing space in one of the commit messages: out,othwerise :P
EDIT: Looks like this has been fixed already, and I was looking at an older version... Double sorry!

@torokati44
Copy link
Member

That stray EditText comment could also be a merge conflict resolution artifact BTW.

Seems like someone forgot to remove it, it does not apply to anything.
Doc comments which are not attached to any code (e.g.. the code has been
commented out) need to be commented out, otherwise they may apply
to the next item below it.
This fixes errors like

    error: the following explicit lifetimes could be elided: 'a
    error: empty line after doc comment
    error: unneeded `return` statement
@Dinnerbone Dinnerbone enabled auto-merge (rebase) October 17, 2024 16:33
@Dinnerbone Dinnerbone merged commit 7ed23b0 into ruffle-rs:master Oct 17, 2024
17 checks passed
@kjarosh kjarosh deleted the clippy branch October 17, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-other Area: Not covered by other area labels T-chore Type: Chore (like updating a dependency, it's gotta be done)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants