mirror of https://github.com/rust-lang/cargo
refactor(spec): Make it easier to add more matches
This commit is contained in:
parent
91d6ecc634
commit
55fb612e45
|
@ -180,10 +180,13 @@ impl PackageIdSpec {
|
|||
}
|
||||
}
|
||||
|
||||
match self.url {
|
||||
Some(ref u) => u == package_id.source_id().url(),
|
||||
None => true,
|
||||
if let Some(u) = &self.url {
|
||||
if u != package_id.source_id().url() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
true
|
||||
}
|
||||
|
||||
/// Checks a list of `PackageId`s to find 1 that matches this `PackageIdSpec`. If 0, 2, or
|
||||
|
|
Loading…
Reference in New Issue