@@ -237,6 +237,12 @@ pub fn visit_packages(ctx: Context) -> Context {
237237 instance. mark_suspect ( RefuseToPinLocal ) ;
238238 return ;
239239 }
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+ }
240246 debug ! ( " it depends on the local instance" ) ;
241247 debug ! ( " its version number (without a range):" ) ;
242248 if !instance. actual_specifier . has_same_version_number_as ( & pinned_specifier) {
@@ -263,15 +269,9 @@ pub fn visit_packages(ctx: Context) -> Context {
263269 return ;
264270 }
265271 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) ;
275275 } ) ;
276276 }
277277 VersionGroupVariant :: SameRange => {
0 commit comments