Skip to content

Commit 706a1cc

Browse files
author
Alex Burka
committed
fix test fallout
1 parent d5e3e8a commit 706a1cc

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/test/run-pass/impl-trait/example-calendar.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,10 @@ trait IteratorExt: Iterator + Sized {
310310
where Self::Item: std::fmt::Display {
311311
let mut s = String::new();
312312
if let Some(e) = self.next() {
313-
write!(s, "{}", e);
313+
write!(s, "{}", e).unwrap();
314314
for e in self {
315315
s.push_str(sep);
316-
write!(s, "{}", e);
316+
write!(s, "{}", e).unwrap();
317317
}
318318
}
319319
s
@@ -537,7 +537,7 @@ fn format_weeks(it: impl Iterator<Item = impl DateIterator>) -> impl Iterator<It
537537
first = false;
538538
}
539539

540-
write!(buf, " {:>2}", d.day());
540+
write!(buf, " {:>2}", d.day()).unwrap();
541541
}
542542

543543
// Insert more filler at the end to fill up the remainder of the week,

src/test/run-pass/macros/colorful-write-macros.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ impl fmt::Write for Bar {
2727
}
2828

2929
fn borrowing_writer_from_struct_and_formatting_struct_field(foo: Foo) {
30-
write!(foo.writer, "{}", foo.other);
30+
write!(foo.writer, "{}", foo.other).unwrap();
3131
}
3232

3333
fn main() {
3434
let mut w = Vec::new();
35-
write!(&mut w as &mut Write, "");
36-
write!(&mut w, ""); // should coerce
35+
write!(&mut w as &mut Write, "").unwrap();
36+
write!(&mut w, "").unwrap(); // should coerce
3737
println!("ok");
3838

3939
let mut s = Bar;
4040
{
4141
use std::fmt::Write;
42-
write!(&mut s, "test");
42+
write!(&mut s, "test").unwrap();
4343
}
4444
}

0 commit comments

Comments
 (0)