From: Malo Jaffré Date: Fri, 29 Dec 2017 22:01:27 +0000 (+0100) Subject: Upgrade flate2 crate to 1.0 in cargotest X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~4^2~2^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f8b32c9f4c5a4778b7354a102530d9ce0428763b;p=cargo.git Upgrade flate2 crate to 1.0 in cargotest I've missed this part in my previous PR, sorry. Unblocks rust#46278. --- diff --git a/tests/cargotest/Cargo.toml b/tests/cargotest/Cargo.toml index fda9ddb53..a059324cf 100644 --- a/tests/cargotest/Cargo.toml +++ b/tests/cargotest/Cargo.toml @@ -9,7 +9,7 @@ path = "lib.rs" [dependencies] cargo = { path = "../.." } filetime = "0.1" -flate2 = "0.2" +flate2 = "1.0" git2 = { version = "0.6", default-features = false } hamcrest = "=0.1.1" hex = "0.2" diff --git a/tests/cargotest/support/registry.rs b/tests/cargotest/support/registry.rs index d7ecdff01..25f8feb14 100644 --- a/tests/cargotest/support/registry.rs +++ b/tests/cargotest/support/registry.rs @@ -3,7 +3,7 @@ use std::fs::{self, File}; use std::io::prelude::*; use std::path::{PathBuf, Path}; -use flate2::Compression::Default; +use flate2::Compression; use flate2::write::GzEncoder; use git2; use hex::ToHex; @@ -273,7 +273,8 @@ impl Package { let dst = self.archive_dst(); t!(fs::create_dir_all(dst.parent().unwrap())); let f = t!(File::create(&dst)); - let mut a = Builder::new(GzEncoder::new(f, Default)); + let mut a = + Builder::new(GzEncoder::new(f, Compression::default())); self.append(&mut a, "Cargo.toml", &manifest); if self.files.is_empty() { self.append(&mut a, "src/lib.rs", "");