Skip to content

New lint: suggest using fs::{read,read_to_string} over File counterparts #4916

Closed
@tesuji

Description

@tesuji

In specific, we recommend to use:

  • std::fs::read_to_string over File::read_to_string
  • std::fs::read over File::read_to_end

But only when buffer is empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsL-complexityLint: Belongs in the complexity lint groupgood first issueThese issues are a good way to get started with Clippy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions