File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -212,9 +212,7 @@ fn print_lockfile_generation(
212
212
// just ourself, nothing worth reporting
213
213
return Ok ( ( ) ) ;
214
214
}
215
- ws. gctx ( )
216
- . shell ( )
217
- . status ( "Locking" , format ! ( "{num_pkgs} packages" ) ) ?;
215
+ status_locking ( ws, num_pkgs) ?;
218
216
219
217
for diff in diff {
220
218
fn format_latest ( version : semver:: Version ) -> String {
@@ -271,10 +269,7 @@ fn print_lockfile_sync(
271
269
if num_pkgs == 0 {
272
270
return Ok ( ( ) ) ;
273
271
}
274
- let plural = if num_pkgs == 1 { "" } else { "s" } ;
275
- ws. gctx ( )
276
- . shell ( )
277
- . status ( "Locking" , format ! ( "{num_pkgs} package{plural}" ) ) ?;
272
+ status_locking ( ws, num_pkgs) ?;
278
273
279
274
for diff in diff {
280
275
fn format_latest ( version : semver:: Version ) -> String {
@@ -488,6 +483,14 @@ fn print_lockfile_updates(
488
483
Ok ( ( ) )
489
484
}
490
485
486
+ fn status_locking ( ws : & Workspace < ' _ > , num_pkgs : usize ) -> CargoResult < ( ) > {
487
+ let plural = if num_pkgs == 1 { "" } else { "s" } ;
488
+ ws. gctx ( )
489
+ . shell ( )
490
+ . status ( "Locking" , format ! ( "{num_pkgs} package{plural}" ) ) ?;
491
+ Ok ( ( ) )
492
+ }
493
+
491
494
fn is_latest ( candidate : & semver:: Version , current : & semver:: Version ) -> bool {
492
495
current < candidate
493
496
// Only match pre-release if major.minor.patch are the same
You can’t perform that action at this time.
0 commit comments