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<()> {
530
530
} else {
531
531
Default :: default ( )
532
532
} ;
533
+
533
534
let offset_width = if offsets_flag && !patches. is_empty ( ) {
534
535
[ patches. first ( ) . unwrap ( ) , patches. last ( ) . unwrap ( ) ]
535
536
. iter ( )
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ mod test {
27
27
#[ test]
28
28
fn format_patch_ids ( ) {
29
29
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}" ) ) ;
31
31
assert_eq ! ( "@ " , format!( "{:4}" , PatchId :: Top ) ) ;
32
32
assert_eq ! ( "~ " , format!( "{:4}" , PatchId :: BelowTop ( None ) ) ) ;
33
33
assert_eq ! ( "~1 " , format!( "{:4}" , PatchId :: BelowTop ( Some ( 1 ) ) ) ) ;
You can’t perform that action at this time.
0 commit comments