Skip to content

Fix clippy warnings#6932

Merged
sylvestre merged 4 commits intouutils:mainfrom
RenjiSann:clippy-fix
Dec 29, 2024
Merged

Fix clippy warnings#6932
sylvestre merged 4 commits intouutils:mainfrom
RenjiSann:clippy-fix

Conversation

@RenjiSann
Copy link
Copy Markdown
Collaborator

No description provided.

}

/// Iterating pid in current system
#[allow(dead_code)]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please comment why it is dead code :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

At first I just did it mindlessly because clippy was complaining. Now that I take a look at it, it seems that the function is only ever used in the test section below. It's used nowhere else.

Actually, the whole file is used absolutely nowhere, so I'm not sure as of what to do with it.
Do we keep it for maybe using it in the future ? Or just get rid of it ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@sylvestre ping

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just add a comment explaining this please :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've actually moved the #[allow(dead_code)] to the root of the file, because warning were still emitted on other functions

Copy link
Copy Markdown
Contributor

@sylvestre sylvestre Dec 21, 2024

Choose a reason for hiding this comment

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

oh, we should remove it from procps and leverage uucore

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Krysztal112233 would it be possible for you to do it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sure, but it might take some time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In the meantime, it might be worth just updating the comment to indicate this intention, so this PR can get merged.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good point. Thanks

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 6, 2024

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@jtracey
Copy link
Copy Markdown
Contributor

jtracey commented Dec 19, 2024

Can we add --tests to the clippy CICD run to catch these earlier?

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@sylvestre sylvestre merged commit 746a173 into uutils:main Dec 29, 2024
@RenjiSann RenjiSann deleted the clippy-fix branch January 22, 2025 09:34
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.

4 participants