mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 13:05:18 +03:00
Auto merge of #40111 - alexcrichton:fix-manifests, r=brson
Attempt to fix nightly manifests Found a few bugs and mistakes with the manifests. Closes #40106
This commit is contained in:
@@ -215,8 +215,8 @@ fn build_manifest(&mut self) -> Manifest {
|
||||
self.package("rust-docs", &mut manifest.pkg, TARGETS);
|
||||
self.package("rust-src", &mut manifest.pkg, &["*"]);
|
||||
|
||||
if self.channel == "rust-nightly" {
|
||||
self.package("analysis", &mut manifest.pkg, TARGETS);
|
||||
if self.channel == "nightly" {
|
||||
self.package("rust-analysis", &mut manifest.pkg, TARGETS);
|
||||
}
|
||||
|
||||
let mut pkg = Package {
|
||||
@@ -283,7 +283,7 @@ fn build_manifest(&mut self) -> Manifest {
|
||||
pkg.target.insert(host.to_string(), Target {
|
||||
available: true,
|
||||
url: Some(self.url("rust", host)),
|
||||
hash: Some(to_hex(digest.as_ref())),
|
||||
hash: Some(digest),
|
||||
components: Some(components),
|
||||
extensions: Some(extensions),
|
||||
});
|
||||
@@ -409,19 +409,3 @@ fn write_manifest(&self, manifest: &str, name: &str) {
|
||||
self.sign(&dst);
|
||||
}
|
||||
}
|
||||
|
||||
fn to_hex(digest: &[u8]) -> String {
|
||||
let mut ret = String::new();
|
||||
for byte in digest {
|
||||
ret.push(hex((byte & 0xf0) >> 4));
|
||||
ret.push(hex(byte & 0xf));
|
||||
}
|
||||
return ret;
|
||||
|
||||
fn hex(b: u8) -> char {
|
||||
match b {
|
||||
0...9 => (b'0' + b) as char,
|
||||
_ => (b'a' + b - 10) as char,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user