@@ -1319,17 +1319,14 @@ impl Lock {
1319
1319
// case, we'd expect the version to be omitted).
1320
1320
if package. id . source . is_source_tree ( ) {
1321
1321
if metadata. dynamic {
1322
- return Ok ( SatisfiesResult :: MismatchedDynamic (
1323
- package. id . name . clone ( ) ,
1324
- false ,
1325
- ) ) ;
1322
+ return Ok ( SatisfiesResult :: MismatchedDynamic ( & package. id . name , false ) ) ;
1326
1323
}
1327
1324
}
1328
1325
1329
1326
// Validate the `version` metadata.
1330
1327
if metadata. version != * version {
1331
1328
return Ok ( SatisfiesResult :: MismatchedVersion (
1332
- package. id . name . clone ( ) ,
1329
+ & package. id . name ,
1333
1330
version. clone ( ) ,
1334
1331
Some ( metadata. version . clone ( ) ) ,
1335
1332
) ) ;
@@ -1434,10 +1431,7 @@ impl Lock {
1434
1431
1435
1432
// Validate that the package is still dynamic.
1436
1433
if !metadata. dynamic {
1437
- return Ok ( SatisfiesResult :: MismatchedDynamic (
1438
- package. id . name . clone ( ) ,
1439
- true ,
1440
- ) ) ;
1434
+ return Ok ( SatisfiesResult :: MismatchedDynamic ( & package. id . name , true ) ) ;
1441
1435
}
1442
1436
1443
1437
// Validate that the requirements are unchanged.
@@ -1447,7 +1441,7 @@ impl Lock {
1447
1441
}
1448
1442
}
1449
1443
} else {
1450
- return Ok ( SatisfiesResult :: MissingVersion ( package. id . name . clone ( ) ) ) ;
1444
+ return Ok ( SatisfiesResult :: MissingVersion ( & package. id . name ) ) ;
1451
1445
}
1452
1446
1453
1447
// Recurse.
@@ -1511,9 +1505,9 @@ pub enum SatisfiesResult<'lock> {
1511
1505
/// A workspace member switched from virtual to non-virtual or vice versa.
1512
1506
MismatchedVirtual ( PackageName , bool ) ,
1513
1507
/// A source tree switched from dynamic to non-dynamic or vice versa.
1514
- MismatchedDynamic ( PackageName , bool ) ,
1508
+ MismatchedDynamic ( & ' lock PackageName , bool ) ,
1515
1509
/// The lockfile uses a different set of version for its workspace members.
1516
- MismatchedVersion ( PackageName , Version , Option < Version > ) ,
1510
+ MismatchedVersion ( & ' lock PackageName , Version , Option < Version > ) ,
1517
1511
/// The lockfile uses a different set of requirements.
1518
1512
MismatchedRequirements ( BTreeSet < Requirement > , BTreeSet < Requirement > ) ,
1519
1513
/// The lockfile uses a different set of constraints.
@@ -1548,7 +1542,7 @@ pub enum SatisfiesResult<'lock> {
1548
1542
BTreeMap < GroupName , BTreeSet < Requirement > > ,
1549
1543
) ,
1550
1544
/// The lockfile is missing a version.
1551
- MissingVersion ( PackageName ) ,
1545
+ MissingVersion ( & ' lock PackageName ) ,
1552
1546
}
1553
1547
1554
1548
/// We discard the lockfile if these options match.
0 commit comments