Skip to content

Commit 6b05bdd

Browse files
committed
switched file mode from NW to W to avoid errors from existing output files
1 parent 9dc7532 commit 6b05bdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/rust/rust_test.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ \section*{File tracking}
9494

9595
\begin{rustblock}[file_io]
9696
// 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)
9898
.unwrap());
9999
writeln!(my_file1, "This is a text file.").unwrap();
100100
writeln!(my_file1, "Some more text.").unwrap();
101101
writeln!(my_file1, "3 + 2 = {}", 3 + 2).unwrap();
102102
drop(my_file1);
103103

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)
105105
.unwrap());
106106
writeln!(my_file2, "This is another text file.").unwrap();
107107
writeln!(my_file2, "Some more text for another text file.").unwrap();

0 commit comments

Comments
 (0)