Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Enable 'clippy::must_use_candidate' lint #185

Merged
merged 4 commits into from
Mar 9, 2021
Merged

Conversation

evdokimovs
Copy link
Contributor

@evdokimovs evdokimovs commented Mar 4, 2021

Synopsis

Currently, we suppress clippy::must_use_candidate lints because it given us many false positives at the start. At this moment this lint doesn't throw many false positives, so we can use it.

Solution

Remove all #[allow(clippy::must_use_candidate)] and fix all lints.

Checklist

  • Created PR:
    • In draft mode
    • Name contains Draft: prefix
    • Name contains issue reference
    • Has k:: labels applied
    • Has assignee
  • Documentation is updated (if required)
  • Tests are updated (if required)
  • Changes conform code style
  • CHANGELOG entry is added (if required)
  • FCM (final commit message) is posted
    • and approved
  • Review is completed and changes are approved
  • Before merge:
    • Milestone is set
    • PR's name and description are correct and up-to-date
    • Draft: prefix is removed
    • All temporary labels are removed

@evdokimovs evdokimovs added enhancement Improvement of existing features or bugfix k::api Related to API (application interface) k::refactor Refactoring, technical debt elimination and other improvements of existing code base labels Mar 4, 2021
@evdokimovs evdokimovs added this to the 0.3.0 milestone Mar 4, 2021
@evdokimovs evdokimovs self-assigned this Mar 4, 2021
@evdokimovs evdokimovs marked this pull request as ready for review March 9, 2021 02:06
@evdokimovs
Copy link
Contributor Author

evdokimovs commented Mar 9, 2021

FCM

Enable and satisfy 'clippy::must_use_candidate' lint (#185)

@evdokimovs evdokimovs requested a review from alexlapa March 9, 2021 02:07
@alexlapa alexlapa modified the milestones: 0.3.0, 0.2.0 Mar 9, 2021
@alexlapa alexlapa changed the title Draft: Fix Clippy 'must_use_candidate' lint (#182) Draft: Fix Clippy 'must_use_candidate' lint Mar 9, 2021
@alexlapa
Copy link
Collaborator

alexlapa commented Mar 9, 2021

@tyranron ,

Я тут в паре мест убрал #[must_use] над async функциями, которые Вы в прошлой задаче добавили. Он, по идее, не нужон, так как async возвращает футуру, которая и так #[must_use]. И клиппи на это вот таким линтом ругается: double_must_use.

Иногда натравливаю клиппи на тесты ради душевного спокойствия.

@alexlapa alexlapa changed the title Draft: Fix Clippy 'must_use_candidate' lint Draft: Enable Clippy 'must_use_candidate' lint Mar 9, 2021
@alexlapa alexlapa requested a review from tyranron March 9, 2021 08:43
@tyranron tyranron changed the title Draft: Enable Clippy 'must_use_candidate' lint Enable 'clippy::must_use_candidate' lint Mar 9, 2021
@tyranron tyranron removed the k::api Related to API (application interface) label Mar 9, 2021
@evdokimovs evdokimovs merged commit 6d84719 into master Mar 9, 2021
@evdokimovs evdokimovs deleted the fix-must-use-lint branch March 9, 2021 19:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement of existing features or bugfix k::refactor Refactoring, technical debt elimination and other improvements of existing code base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants