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

Add elapsed_instant lint #9264

Merged
merged 1 commit into from
Aug 2, 2022
Merged

Add elapsed_instant lint #9264

merged 1 commit into from
Aug 2, 2022

Conversation

guerinoni
Copy link
Contributor

@guerinoni guerinoni commented Jul 30, 2022

Closes #8603

  • Followed [lint naming conventions][lint_naming]
  • Added passing UI tests (including committed .stderr file)
  • cargo test passes locally
  • Executed cargo dev update_lints
  • Added lint documentation
  • Run cargo dev fmt

changelog: [elapsed_instant]: Add lint

@rust-highfive
Copy link

r? @Alexendoo

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 30, 2022
@guerinoni guerinoni marked this pull request as ready for review July 30, 2022 14:06
Copy link
Member

@Alexendoo Alexendoo left a comment

Choose a reason for hiding this comment

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

Hello! Thanks for the PR

clippy_lints/src/instant_elapsed.rs Outdated Show resolved Hide resolved
clippy_lints/src/instant_elapsed.rs Outdated Show resolved Hide resolved
clippy_lints/src/instant_elapsed.rs Outdated Show resolved Hide resolved
clippy_lints/src/instant_elapsed.rs Outdated Show resolved Hide resolved
clippy_lints/src/instant_elapsed.rs Outdated Show resolved Hide resolved
tests/ui/instant_elapsed.rs Outdated Show resolved Hide resolved
clippy_lints/src/instant_elapsed.rs Outdated Show resolved Hide resolved
clippy_lints/src/instant_elapsed.rs Outdated Show resolved Hide resolved
Copy link
Member

@Alexendoo Alexendoo left a comment

Choose a reason for hiding this comment

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

Thanks again just some documentation/formatting left and it'll be good to go

clippy_lints/src/manual_instant_elapsed.rs Outdated Show resolved Hide resolved
clippy_lints/src/manual_instant_elapsed.rs Outdated Show resolved Hide resolved
clippy_lints/src/manual_instant_elapsed.rs Outdated Show resolved Hide resolved
@guerinoni
Copy link
Contributor Author

@Alexendoo Thank you so much :)

Closes #8603

Signed-off-by: Federico Guerinoni <guerinoni.federico@gmail.com>
@Alexendoo
Copy link
Member

Thanks!

@bors r+

For what it's worth you don't need to hit the request review button. Since we get a notification on each commit after we're assigned I don't think it actually does anything

@bors
Copy link
Collaborator

bors commented Aug 2, 2022

📌 Commit 0696624 has been approved by Alexendoo

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Aug 2, 2022

⌛ Testing commit 0696624 with merge 00e59cd...

@bors
Copy link
Collaborator

bors commented Aug 2, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Alexendoo
Pushing 00e59cd to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prefer instant.elapsed() over Instant::now() - instant
4 participants