about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHaydon Ryan <haydon.ryan@gmail.com>2024-02-15 08:20:45 -0600
committerGitHub <noreply@github.com>2024-02-15 08:20:45 -0600
commitb5e1ca39180e9997efef14d3b7d06a3ddff72b59 (patch)
treefac72cd91659a16edc34fc43bc5f2ffff3b16ebd
parent9539feb2f73b1e9370e28a6dcdaf0fe51bc65465 (diff)
downloadrust-b5e1ca39180e9997efef14d3b7d06a3ddff72b59.tar.gz
rust-b5e1ca39180e9997efef14d3b7d06a3ddff72b59.zip
Update library/std/src/fs.rs
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
-rw-r--r--library/std/src/fs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs
index 29b61a8d1d0..5bcd92b63df 100644
--- a/library/std/src/fs.rs
+++ b/library/std/src/fs.rs
@@ -244,8 +244,8 @@ pub struct DirBuilder {
 /// use std::fs;
 ///
 /// fn main() -> Result<(), Box<dyn std::error::Error + 'static>> {
-///     let address: String = String::from_utf8_lossy(&fs::read("address.txt")?).to_string();
-///     println!("{}", address);
+///     let data: Vec<u8> = fs::read("image.jpg")?;
+///     assert_eq!(data[0..3], [0xFF, 0xD8, 0xFF]);
 ///     Ok(())
 /// }
 /// ```