build-manifest: Remove old to_hex function
This was actually just generating invalid hashes for the `rust` component.
This commit is contained in:
parent
476a1cc244
commit
5ed6765fd4
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user