File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff 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,
Original file line number Diff line number Diff line change @@ -27,18 +27,18 @@ impl fmt::Write for Bar {
2727}
2828
2929fn 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
3333fn 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}
You can’t perform that action at this time.
0 commit comments