Skip to content

Commit 3b2de5a

Browse files
author
Philipp Zins
committed
fixed wrong example (only code, README.md was correct)
1 parent 279ed76 commit 3b2de5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

read-files/rust/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn main() {
88
Ok(file) => file,
99
};
1010

11-
let mut data = "";
11+
let mut data = String::new();
1212
match file.read_to_string(&mut data) {
1313
Err(err) => panic!("Couldn't read: {}", err.description()),
1414
Ok(_) => print!("Content is: {}", data),

0 commit comments

Comments
 (0)