Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve std::fs::read_to_string example #118623

Merged
merged 4 commits into from
Mar 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update library/std/src/fs.rs
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
  • Loading branch information
haydonryan and m-ou-se authored Feb 15, 2024
commit 9539feb2f73b1e9370e28a6dcdaf0fe51bc65465
4 changes: 2 additions & 2 deletions library/std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ pub fn read<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
/// use std::error::Error;
///
/// fn main() -> Result<(), Box<dyn Error>> {
/// let address: String = fs::read_to_string("address.txt")?;
/// println!("{}", address);
/// let message: String = fs::read_to_string("message.txt")?;
/// println!("{}", message);
/// Ok(())
/// }
/// ```
Expand Down
Loading