@@ -417,7 +417,7 @@ impl VersionMapLazy {
417417 } ;
418418
419419 // Prioritize amongst all available files.
420- let yanked = file. yanked . clone ( ) ;
420+ let yanked = file. yanked . as_deref ( ) ;
421421 let hashes = file. hashes . clone ( ) ;
422422 match filename {
423423 DistFilename :: WheelFilename ( filename) => {
@@ -472,7 +472,7 @@ impl VersionMapLazy {
472472 name : & PackageName ,
473473 version : & Version ,
474474 hashes : & [ HashDigest ] ,
475- yanked : Option < Yanked > ,
475+ yanked : Option < & Yanked > ,
476476 excluded : bool ,
477477 upload_time : Option < i64 > ,
478478 ) -> SourceDistCompatibility {
@@ -491,7 +491,9 @@ impl VersionMapLazy {
491491 // Check if yanked
492492 if let Some ( yanked) = yanked {
493493 if yanked. is_yanked ( ) && !self . allowed_yanks . contains ( name, version) {
494- return SourceDistCompatibility :: Incompatible ( IncompatibleSource :: Yanked ( yanked) ) ;
494+ return SourceDistCompatibility :: Incompatible ( IncompatibleSource :: Yanked (
495+ yanked. clone ( ) ,
496+ ) ) ;
495497 }
496498 }
497499
@@ -519,7 +521,7 @@ impl VersionMapLazy {
519521 name : & PackageName ,
520522 version : & Version ,
521523 hashes : & [ HashDigest ] ,
522- yanked : Option < Yanked > ,
524+ yanked : Option < & Yanked > ,
523525 excluded : bool ,
524526 upload_time : Option < i64 > ,
525527 ) -> WheelCompatibility {
@@ -536,7 +538,7 @@ impl VersionMapLazy {
536538 // Check if yanked
537539 if let Some ( yanked) = yanked {
538540 if yanked. is_yanked ( ) && !self . allowed_yanks . contains ( name, version) {
539- return WheelCompatibility :: Incompatible ( IncompatibleWheel :: Yanked ( yanked) ) ;
541+ return WheelCompatibility :: Incompatible ( IncompatibleWheel :: Yanked ( yanked. clone ( ) ) ) ;
540542 }
541543 }
542544
0 commit comments