mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Crate checksum lookup includes build metadata
This commit is contained in:
parent
3a73377919
commit
8d6464000e
@ -379,7 +379,9 @@ impl<'cfg> RegistryIndex<'cfg> {
|
||||
pub fn hash(&mut self, pkg: PackageId, load: &mut dyn RegistryData) -> Poll<CargoResult<&str>> {
|
||||
let req = OptVersionReq::exact(pkg.version());
|
||||
let summary = self.summaries(&pkg.name(), &req, load)?;
|
||||
let summary = ready!(summary).next();
|
||||
let summary = ready!(summary)
|
||||
.filter(|s| s.summary.version() == pkg.version())
|
||||
.next();
|
||||
Poll::Ready(Ok(summary
|
||||
.ok_or_else(|| internal(format!("no hash listed for {}", pkg)))?
|
||||
.summary
|
||||
@ -623,10 +625,10 @@ impl<'cfg> RegistryIndex<'cfg> {
|
||||
load: &mut dyn RegistryData,
|
||||
) -> Poll<CargoResult<bool>> {
|
||||
let req = OptVersionReq::exact(pkg.version());
|
||||
let found = self
|
||||
.summaries(&pkg.name(), &req, load)
|
||||
.map_ok(|mut p| p.any(|summary| summary.yanked));
|
||||
found
|
||||
let found = ready!(self.summaries(&pkg.name(), &req, load))?
|
||||
.filter(|s| s.summary.version() == pkg.version())
|
||||
.any(|summary| summary.yanked);
|
||||
Poll::Ready(Ok(found))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -694,6 +694,7 @@ impl<'cfg> RegistrySource<'cfg> {
|
||||
.summaries(&package.name(), &req, &mut *self.ops)?
|
||||
.expect("a downloaded dep now pending!?")
|
||||
.map(|s| s.summary.clone())
|
||||
.filter(|s| s.version() == package.version())
|
||||
.next()
|
||||
.expect("summary not found");
|
||||
if let Some(cksum) = summary_with_cksum.checksum() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user