Commit 9f7e20b
authored
Rollup merge of rust-lang#100337 - camelid:stabilize-io_read_to_string, r=JohnTitor
Stabilize `std::io::read_to_string`
Closes rust-lang#80218. 🎉
This PR stabilizes the `std::io::read_to_string` function, with the following public API:
```rust
pub fn read_to_string<R: Read>(reader: R) -> Result<String>;
```
It's analogous to `std::fs::read_to_string` for files, but it works on anything that implements `io::Read`, including `io::stdin()`.
See the tracking issue (rust-lang#80218) or documentation for details.1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1037 | 1037 | | |
1038 | 1038 | | |
1039 | 1039 | | |
1040 | | - | |
1041 | | - | |
1042 | 1040 | | |
1043 | 1041 | | |
1044 | 1042 | | |
| |||
1047 | 1045 | | |
1048 | 1046 | | |
1049 | 1047 | | |
1050 | | - | |
| 1048 | + | |
1051 | 1049 | | |
1052 | 1050 | | |
1053 | 1051 | | |
| |||
0 commit comments