]> git.lizzy.rs Git - rust.git/commitdiff
build-manifest: Remove old to_hex function
authorAlex Crichton <alex@alexcrichton.com>
Sun, 26 Feb 2017 04:16:42 +0000 (20:16 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 26 Feb 2017 04:20:09 +0000 (20:20 -0800)
This was actually just generating invalid hashes for the `rust`
component.

src/tools/build-manifest/src/main.rs

index 18c7932a2c030dac7084c895a6edf4616d8e46cf..c2c91487b0c1714f19f39321e6f12fe9270ffe4d 100644 (file)
@@ -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,
-        }
-    }
-}