File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ use kinds::{Copy, Sized};
19
19
use mem;
20
20
use option:: Option ;
21
21
use option:: Option :: { Some , None } ;
22
- use ops:: Deref ;
22
+ use ops:: { Deref , FnOnce } ;
23
23
use result:: Result :: { Ok , Err } ;
24
24
use result;
25
25
use slice:: SlicePrelude ;
@@ -491,10 +491,9 @@ impl<'a> Formatter<'a> {
491
491
492
492
/// Runs a callback, emitting the correct padding either before or
493
493
/// afterwards depending on whether right or left alignment is requested.
494
- fn with_padding ( & mut self ,
495
- padding : uint ,
496
- default : rt:: Alignment ,
497
- f: |& mut Formatter | -> Result ) -> Result {
494
+ fn with_padding < F > ( & mut self , padding : uint , default : rt:: Alignment , f : F ) -> Result where
495
+ F : FnOnce ( & mut Formatter ) -> Result ,
496
+ {
498
497
use char:: Char ;
499
498
let align = match self . align {
500
499
rt:: AlignUnknown => default,
You can’t perform that action at this time.
0 commit comments