Closed
Description
Current
use std::fs::File;
use std::io::Read;
fn main() {
let mut file = File::open("src/hello.txt").expect("file not found");
let mut content = String::new();
file.read_to_string(&mut content)
.expect("can't read the file");
println!("{}", content);
}
Expected
use std::fs::File;
use std::io::Read;
fn main() {
let mut file = File::open("src/hello.txt").expect("file not found");
let mut content = String::new();
file.read_to_string(&mut content)
.expect("can't read the file");
println!("{}", content);
}