Closed
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.