From 706a1cc0f21bb3212e1e1f9987f5be543ae12f6e Mon Sep 17 00:00:00 2001 From: Alex Burka Date: Sat, 3 Nov 2018 05:03:30 +0000 Subject: [PATCH] fix test fallout --- src/test/run-pass/impl-trait/example-calendar.rs | 6 +++--- src/test/run-pass/macros/colorful-write-macros.rs | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/run-pass/impl-trait/example-calendar.rs b/src/test/run-pass/impl-trait/example-calendar.rs index 6cf06d1562104..e6dd421f48f51 100644 --- a/src/test/run-pass/impl-trait/example-calendar.rs +++ b/src/test/run-pass/impl-trait/example-calendar.rs @@ -310,10 +310,10 @@ trait IteratorExt: Iterator + Sized { where Self::Item: std::fmt::Display { let mut s = String::new(); if let Some(e) = self.next() { - write!(s, "{}", e); + write!(s, "{}", e).unwrap(); for e in self { s.push_str(sep); - write!(s, "{}", e); + write!(s, "{}", e).unwrap(); } } s @@ -537,7 +537,7 @@ fn format_weeks(it: impl Iterator) -> impl Iterator2}", d.day()); + write!(buf, " {:>2}", d.day()).unwrap(); } // Insert more filler at the end to fill up the remainder of the week, diff --git a/src/test/run-pass/macros/colorful-write-macros.rs b/src/test/run-pass/macros/colorful-write-macros.rs index 7c557eb2bd079..ee597f11c6a9d 100644 --- a/src/test/run-pass/macros/colorful-write-macros.rs +++ b/src/test/run-pass/macros/colorful-write-macros.rs @@ -27,18 +27,18 @@ impl fmt::Write for Bar { } fn borrowing_writer_from_struct_and_formatting_struct_field(foo: Foo) { - write!(foo.writer, "{}", foo.other); + write!(foo.writer, "{}", foo.other).unwrap(); } fn main() { let mut w = Vec::new(); - write!(&mut w as &mut Write, ""); - write!(&mut w, ""); // should coerce + write!(&mut w as &mut Write, "").unwrap(); + write!(&mut w, "").unwrap(); // should coerce println!("ok"); let mut s = Bar; { use std::fmt::Write; - write!(&mut s, "test"); + write!(&mut s, "test").unwrap(); } }