-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.P-lowLow priorityLow priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Every time I want to load the contents of a file to a String
I think this same thing: "there should be a fs::read_to_string".
It looks like to me the most convenient way to do this once ?
is stable (which doesn't seem to be near) might be File::open(path)?.read_to_string()?
, assuming you've got the Read
trait imported. It's just not as nice.
We as @rust-lang/libs can be more aggressive about identifying and adding simple ergonomic improvements like this.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.P-lowLow priorityLow priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.