File tree 2 files changed +7
-7
lines changed
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 {
310
310
where Self :: Item : std:: fmt:: Display {
311
311
let mut s = String :: new ( ) ;
312
312
if let Some ( e) = self . next ( ) {
313
- write ! ( s, "{}" , e) ;
313
+ write ! ( s, "{}" , e) . unwrap ( ) ;
314
314
for e in self {
315
315
s. push_str ( sep) ;
316
- write ! ( s, "{}" , e) ;
316
+ write ! ( s, "{}" , e) . unwrap ( ) ;
317
317
}
318
318
}
319
319
s
@@ -537,7 +537,7 @@ fn format_weeks(it: impl Iterator<Item = impl DateIterator>) -> impl Iterator<It
537
537
first = false ;
538
538
}
539
539
540
- write ! ( buf, " {:>2}" , d. day( ) ) ;
540
+ write ! ( buf, " {:>2}" , d. day( ) ) . unwrap ( ) ;
541
541
}
542
542
543
543
// 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 {
27
27
}
28
28
29
29
fn borrowing_writer_from_struct_and_formatting_struct_field ( foo : Foo ) {
30
- write ! ( foo. writer, "{}" , foo. other) ;
30
+ write ! ( foo. writer, "{}" , foo. other) . unwrap ( ) ;
31
31
}
32
32
33
33
fn main ( ) {
34
34
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
37
37
println ! ( "ok" ) ;
38
38
39
39
let mut s = Bar ;
40
40
{
41
41
use std:: fmt:: Write ;
42
- write ! ( & mut s, "test" ) ;
42
+ write ! ( & mut s, "test" ) . unwrap ( ) ;
43
43
}
44
44
}
You can’t perform that action at this time.
0 commit comments