git2 = "0.6"
git2-curl = "0.7"
glob = "0.2"
-hex = "0.2"
+hex = "0.3"
home = "0.3"
ignore = "0.3"
jobserver = "0.1.6"
use std::io::Read;
use std::path::{Path, PathBuf};
-use hex::ToHex;
+use hex;
use serde_json;
file.display())
})?;
- let actual = h.finish().to_hex();
+ let actual = hex::encode(h.finish());
if &*actual != cksum {
bail!("\
the listed checksum of `{}` has changed:\n\
use std::path::Path;
use core::PackageId;
-use hex::ToHex;
+use hex;
use sources::registry::{RegistryData, RegistryConfig};
use util::FileLock;
use util::paths;
}
state.update(&buf[..n]);
}
- if state.finish().to_hex() != checksum {
+ if hex::encode(state.finish()) != checksum {
bail!("failed to verify the checksum of `{}`", pkg)
}
use std::str;
use git2;
-use hex::ToHex;
+use hex;
use serde_json;
use core::{PackageId, SourceId};
})?;
// Verify what we just downloaded
- if state.finish().to_hex() != checksum {
+ if hex::encode(state.finish()) != checksum {
bail!("failed to verify the checksum of `{}`", pkg)
}
#![allow(deprecated)]
-use hex::ToHex;
+use hex;
use std::hash::{Hasher, Hash, SipHasher};
pub fn to_hex(num: u64) -> String {
- [
+ hex::encode(&[
(num >> 0) as u8,
(num >> 8) as u8,
(num >> 16) as u8,
(num >> 40) as u8,
(num >> 48) as u8,
(num >> 56) as u8,
- ].to_hex()
+ ])
}
pub fn hash_u64<H: Hash>(hashable: &H) -> u64 {