]> git.proxmox.com Git - cargo.git/commitdiff
Upgrade flate2 crate to 1.0 in cargotest
authorMalo Jaffré <jaffre.malo@gmail.com>
Fri, 29 Dec 2017 22:01:27 +0000 (23:01 +0100)
committerMalo Jaffré <jaffre.malo@gmail.com>
Fri, 29 Dec 2017 22:02:00 +0000 (23:02 +0100)
I've missed this part in my previous PR, sorry.
Unblocks rust#46278.

tests/cargotest/Cargo.toml
tests/cargotest/support/registry.rs

index fda9ddb53480db777efe743551df37448dbafeb5..a059324cf9427dac01055f9e884ca776a1cffba9 100644 (file)
@@ -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"
index d7ecdff01120a64d0aeb6e61278c975d6af14d7e..25f8feb145cf8d2c8c7f9d9ba3e35d9dcaecf39e 100644 (file)
@@ -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", "");