@@ -237,6 +237,12 @@ pub fn visit_packages(ctx: Context) -> Context {
237
237
instance. mark_suspect ( RefuseToPinLocal ) ;
238
238
return ;
239
239
}
240
+ if instance. already_equals ( & pinned_specifier) {
241
+ debug ! ( " it is identical to the pinned version" ) ;
242
+ debug ! ( " mark as valid" ) ;
243
+ instance. mark_valid ( IsIdenticalToPin , & pinned_specifier) ;
244
+ return ;
245
+ }
240
246
debug ! ( " it depends on the local instance" ) ;
241
247
debug ! ( " its version number (without a range):" ) ;
242
248
if !instance. actual_specifier . has_same_version_number_as ( & pinned_specifier) {
@@ -263,15 +269,9 @@ pub fn visit_packages(ctx: Context) -> Context {
263
269
return ;
264
270
}
265
271
debug ! ( " it is not in a semver group which prefers a different semver range to the pinned version" ) ;
266
- if instance. already_equals ( & pinned_specifier) {
267
- debug ! ( " it is identical to the pinned version" ) ;
268
- debug ! ( " mark as valid" ) ;
269
- instance. mark_valid ( IsIdenticalToPin , & pinned_specifier) ;
270
- } else {
271
- debug ! ( " it differs to the pinned version" ) ;
272
- debug ! ( " mark as error" ) ;
273
- instance. mark_fixable ( DiffersToPin , & pinned_specifier) ;
274
- }
272
+ debug ! ( " it differs to the pinned version" ) ;
273
+ debug ! ( " mark as error" ) ;
274
+ instance. mark_fixable ( DiffersToPin , & pinned_specifier) ;
275
275
} ) ;
276
276
}
277
277
VersionGroupVariant :: SameRange => {
0 commit comments