-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
A-lintArea: New lintsArea: New lintsL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
What it does
Lints unnecessary as-casts of literals when they could be written using literal syntax.
Categories (optional)
- Kind:
clippy::style
What is the advantage of the recommended code over the original code
- Avoids accidental truncation
- Uses syntax dedicated to this purpose
Drawbacks
None.
Example
1 as u32Could be written as:
1u32sanmai-NL
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lintsL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy