-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix clippy warnings #6932
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
Fix clippy warnings #6932
Conversation
@@ -315,6 +315,7 @@ fn stat_split(stat: &str) -> Vec<String> { | |||
} | |||
|
|||
/// Iterating pid in current system | |||
#[allow(dead_code)] |
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.
please comment why it is dead code :)
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.
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 ?
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.
@sylvestre ping
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.
Just add a comment explaining this please :)
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.
I've actually moved the #[allow(dead_code)]
to the root of the file, because warning were still emitted on other functions
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.
oh, we should remove it from procps and leverage uucore
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.
@Krysztal112233 would it be possible for you to do it?
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.
Sure, but it might take some time.
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.
In the meantime, it might be worth just updating the comment to indicate this intention, so this PR can get 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.
Good point. Thanks
GNU testsuite comparison:
|
bd91415
to
75ce83f
Compare
GNU testsuite comparison:
|
75ce83f
to
53cf108
Compare
Can we add |
53cf108
to
90f2525
Compare
GNU testsuite comparison:
|
6c5dfe0
to
e8141d3
Compare
GNU testsuite comparison:
|
No description provided.