about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Burka <web@alexburka.com>2018-11-03 05:03:30 +0000
committerAlex Burka <web@alexburka.com>2018-11-03 05:03:30 +0000
commit706a1cc0f21bb3212e1e1f9987f5be543ae12f6e (patch)
tree425fc0255b45f3c43c32eeaf1c4d9a20de53b01c
parentd5e3e8a89f7279a2240b691752d0f850feab8929 (diff)
downloadrust-706a1cc0f21bb3212e1e1f9987f5be543ae12f6e.tar.gz
rust-706a1cc0f21bb3212e1e1f9987f5be543ae12f6e.zip
fix test fallout
-rw-r--r--src/test/run-pass/impl-trait/example-calendar.rs6
-rw-r--r--src/test/run-pass/macros/colorful-write-macros.rs8
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 6cf06d15621..e6dd421f48f 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<Item = impl DateIterator>) -> impl Iterator<It
                 first = false;
             }
 
-            write!(buf, " {:>2}", 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 7c557eb2bd0..ee597f11c6a 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();
     }
 }