Skip to content

Re-enable cast_lossless lint by default #4864

Closed as not planned
Closed as not planned
@Shnatsel

Description

@Shnatsel

The cast_lossless lint has been made pedantic following #4528, with the reasoning being "It will only become a problem if the code changes in the future".

I am a happy user of this lint, and I find that converting always-lossless casts to from() calls as the lint suggests clarifies the code a great deal: it makes it explicit where truncation may happen, which makes the code much easier to understand.

As such, I believe this lint is a good candidate for clippy::style category. Perhaps its description could be revised to make the readability aspect more explicit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-categoryArea: Categorization of lintsS-needs-discussionStatus: Needs further discussion before merging or work can be started

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions