Upgrade deps

Summary:
Couldn't do this because we were stuck on an old version
of digest internally with breaking changes. Now there's a
`sha2-9` option to make it build.

Reviewed By: mweststrate

Differential Revision: D26404582

fbshipit-source-id: 9851de3439ea263eaddb558daaf4cf9e73b062cc
This commit is contained in:
Pascal Hartig
2021-02-12 04:41:32 -08:00
committed by Facebook GitHub Bot
parent 7fd0c7d82e
commit f69723978d
4 changed files with 45 additions and 63 deletions

View File

@@ -105,7 +105,6 @@ fn pack_platform(
) -> Result<()> {
let base_dir = match platform {
Platform::Mac => path::Path::new(dist_dir).join("mac"),
// TODO: Verify this.
Platform::Linux => path::Path::new(dist_dir).join("linux-unpacked"),
Platform::Windows => path::Path::new(dist_dir).join("win-unpacked"),
};
@@ -133,7 +132,7 @@ fn sha256_digest<R: io::Read>(mut reader: &mut R) -> Result<HashSum> {
let mut sha256 = Sha256::new();
std::io::copy(&mut reader, &mut sha256)?;
let hash = sha256.result();
let hash = sha256.finalize();
Ok(HashSum(data_encoding::HEXLOWER.encode(&hash)))
}