File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -94,14 +94,14 @@ \section*{File tracking}
94
94
95
95
\begin {rustblock }[file_io]
96
96
// Open and write to two files, to check created file tracking
97
- let mut my_file1 = io::BufWriter::new(rstex.open("my_file1.txt", open_mode::NW )
97
+ let mut my_file1 = io::BufWriter::new(rstex.open("my_file1.txt", open_mode::W )
98
98
.unwrap());
99
99
writeln!(my_file1, "This is a text file." ).unwrap();
100
100
writeln!(my_file1, "Some more text." ).unwrap();
101
101
writeln!(my_file1, "3 + 2 = {}" , 3 + 2).unwrap();
102
102
drop(my_file1);
103
103
104
- let mut my_file2 = io::BufWriter::new(rstex.open("my_file2.txt", open_mode::NW )
104
+ let mut my_file2 = io::BufWriter::new(rstex.open("my_file2.txt", open_mode::W )
105
105
.unwrap());
106
106
writeln!(my_file2, "This is another text file." ).unwrap();
107
107
writeln!(my_file2, "Some more text for another text file." ).unwrap();
You can’t perform that action at this time.
0 commit comments