-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add #[must_use] to len and is_empty #89786
Conversation
r=me with the nit fixed in the tests. |
229f707
to
64bb2c1
Compare
@bors r+ |
📌 Commit 64bb2c1 has been approved by |
…, r=joshtriplett Add #[must_use] to len and is_empty Parent issue: rust-lang#89692 r? `@joshtriplett`
…, r=joshtriplett Add #[must_use] to len and is_empty Parent issue: rust-lang#89692 r? ``@joshtriplett``
Looks like this failed a rollup in #89801 (comment) @bors r- |
64bb2c1
to
c509346
Compare
Clippy test fixed and blessed. I'll make sure to run the Clippy test suite in my future PRs since CI doesn't seem to catch them. How did this make it past the CI checks? Should I submit an issue against the CI system? |
It looks like the clippy tests are only run for individual PRs if something in clippy has changed. They're not run for all PRs because it would add too much CI time.
|
false_positive.into_iter().count(); | ||
let _ = false_positive.iter().count(); | ||
let _ = false_positive.iter_mut().count(); | ||
let _ = false_positive.into_iter().count(); |
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 think for tests it would be fine to just supress the warning instead of adding tons of let _
.
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'll defer to @joshtriplett.
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 personally prefer adding let _ =
, but I don't have a strong preference, and if the maintainer of these tests prefers to suppress the lint that's fine.
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.
Who's the maintainer? Do I have an action?
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 don't have a strong preference, so go ahead and switch this one to suppress the lint.
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.
Done.
c509346
to
6745e8d
Compare
@bors r+ |
📌 Commit 6745e8d has been approved by |
…askrgr Rollup of 4 pull requests Successful merges: - rust-lang#89068 (Restructure std::rt (part 2)) - rust-lang#89786 (Add #[must_use] to len and is_empty) - rust-lang#90430 (Add #[must_use] to remaining std functions (A-N)) - rust-lang#90431 (Add #[must_use] to remaining std functions (O-Z)) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…, r=joshtriplett Add #[must_use] to len and is_empty Parent issue: rust-lang#89692 r? `@joshtriplett`
Parent issue: #89692
r? @joshtriplett