diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 92d3838d9f28f..e461791033edf 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -271,7 +271,8 @@ pub fn read>(path: P) -> io::Result> { /// Reads the entire contents of a file into a string. /// /// This is a convenience function for using [`File::open`] and [`read_to_string`] -/// with fewer imports and without an intermediate variable. +/// with fewer imports, without an intermediate variable, and with improved performance +/// by referencing the file's metadata to preallocate buffer size. /// /// [`read_to_string`]: Read::read_to_string ///