File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -530,6 +530,7 @@ fn run(matches: &ArgMatches) -> Result<()> {
530530 } else {
531531 Default :: default ( )
532532 } ;
533+
533534 let offset_width = if offsets_flag && !patches. is_empty ( ) {
534535 [ patches. first ( ) . unwrap ( ) , patches. last ( ) . unwrap ( ) ]
535536 . iter ( )
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ mod test {
2727 #[ test]
2828 fn format_patch_ids ( ) {
2929 let pn = PatchId :: Name ( crate :: patch:: PatchName :: from_str ( "p1" ) . unwrap ( ) ) ;
30- assert_eq ! ( "p1 " , format!( "{:4}" , pn ) ) ;
30+ assert_eq ! ( "p1 " , format!( "{pn :4}" ) ) ;
3131 assert_eq ! ( "@ " , format!( "{:4}" , PatchId :: Top ) ) ;
3232 assert_eq ! ( "~ " , format!( "{:4}" , PatchId :: BelowTop ( None ) ) ) ;
3333 assert_eq ! ( "~1 " , format!( "{:4}" , PatchId :: BelowTop ( Some ( 1 ) ) ) ) ;
You can’t perform that action at this time.
0 commit comments