diff options
| author | Jane Lusby <jlusby@yaah.dev> | 2021-09-27 14:50:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-27 14:50:35 -0700 |
| commit | 0911069febd6c247594c26e41c2e5cf8ffb8a74f (patch) | |
| tree | 12a35f8d2c3aadc593f8cf827a1272bb4a2b1b1a | |
| parent | 7779eb74c8367bc718a2005b4af42796a5d0b023 (diff) | |
| download | rust-0911069febd6c247594c26e41c2e5cf8ffb8a74f.tar.gz rust-0911069febd6c247594c26e41c2e5cf8ffb8a74f.zip | |
Apply suggestions from code review
Co-authored-by: kennytm <kennytm@gmail.com>
| -rw-r--r-- | library/test/src/formatters/junit.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/test/src/formatters/junit.rs b/library/test/src/formatters/junit.rs index 44a33c92a9f..04057906d1c 100644 --- a/library/test/src/formatters/junit.rs +++ b/library/test/src/formatters/junit.rs @@ -29,7 +29,7 @@ impl<T: Write> JunitFormatter<T> { impl<T: Write> OutputFormatter for JunitFormatter<T> { fn write_run_start(&mut self, _test_count: usize) -> io::Result<()> { // We write xml header on run start - self.out.write_all("\n".as_bytes())?; + self.out.write_all(b"\n")?; self.write_message("<?xml version=\"1.0\" encoding=\"UTF-8\"?>") } @@ -134,7 +134,7 @@ impl<T: Write> OutputFormatter for JunitFormatter<T> { self.write_message("</testsuite>")?; self.write_message("</testsuites>")?; - self.out.write_all("\n\n".as_bytes())?; + self.out.write_all(b"\n\n")?; Ok(state.failed == 0) } |
