diff --git a/Cargo.lock b/Cargo.lock index 9ff4bc10582..36faa7c80f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1086,9 +1086,9 @@ dependencies = [ [[package]] name = "hex" -version = "0.3.2" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" +checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" [[package]] name = "hostname" diff --git a/Cargo.toml b/Cargo.toml index f09280a1909..a90e0944977 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ openssl = "0.10.13" oauth2 = "2.0.0" log = "0.4" env_logger = "0.7" -hex = "0.3" +hex = "0.4" htmlescape = "0.3.1" license-exprs = "^1.4" dotenv = "0.15" diff --git a/src/controllers/krate/publish.rs b/src/controllers/krate/publish.rs index 3322ec0e365..93f3e1d5a50 100644 --- a/src/controllers/krate/publish.rs +++ b/src/controllers/krate/publish.rs @@ -192,8 +192,7 @@ pub fn publish(req: &mut dyn Request) -> AppResult { .uploader .upload_crate(req, &krate, maximums, vers)?; - let mut hex_cksum = String::new(); - cksum.write_hex(&mut hex_cksum)?; + let hex_cksum = cksum.encode_hex::(); // Register this crate in our local git repo. let git_crate = git::Crate {