From 476a1cc244717cf0599d5988d12bc94d4264cf8e Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 25 Feb 2017 20:16:22 -0800 Subject: [PATCH 1/2] build-manifest: Fix typos with rust-analysis The name of the package is 'rust-analysis', not 'analysis', and then name of the channel is 'nightly', not 'rust-nightly' --- src/tools/build-manifest/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 6d40dcacdba43..18c7932a2c030 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -215,8 +215,8 @@ impl Builder { 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 { From 5ed6765fd419e50f88de0323fc8328568ed55ab0 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 25 Feb 2017 20:16:42 -0800 Subject: [PATCH 2/2] build-manifest: Remove old to_hex function This was actually just generating invalid hashes for the `rust` component. --- src/tools/build-manifest/src/main.rs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs index 18c7932a2c030..c2c91487b0c17 100644 --- a/src/tools/build-manifest/src/main.rs +++ b/src/tools/build-manifest/src/main.rs @@ -283,7 +283,7 @@ impl Builder { 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 @@ impl Builder { 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, - } - } -}