Skip to content

Update flate2 to 1.0 and address changes #1438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ rustdoc-args = [
cargo-registry-s3 = { path = "src/s3", version = "0.2.0" }
rand = "0.3"
git2 = "0.6.4"
flate2 = "0.2"
flate2 = "1.0"
semver = "0.5"
url = "1.2.1"
tar = "0.4.13"
Expand Down
5 changes: 1 addition & 4 deletions src/bin/render-readmes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,7 @@ fn get_readme(config: &Config, version: &Version, krate_name: &str) -> Option<St
return None;
}
let reader = Cursor::new(response);
let reader = GzDecoder::new(reader).expect(&format!(
"[{}-{}] Invalid gzip header",
krate_name, version.num
));
let reader = GzDecoder::new(reader);
let mut archive = Archive::new(reader);
let mut entries = archive.entries().expect(&format!(
"[{}-{}] Invalid tar archive entries",
Expand Down
2 changes: 1 addition & 1 deletion src/tests/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ fn new_crate_to_body_with_io(
) -> Vec<u8> {
let mut tarball = Vec::new();
{
let mut ar = tar::Builder::new(GzEncoder::new(&mut tarball, Compression::Default));
let mut ar = tar::Builder::new(GzEncoder::new(&mut tarball, Compression::default()));
for &mut (name, ref mut data, size) in files {
let mut header = tar::Header::new_gnu();
t!(header.set_path(name));
Expand Down
2 changes: 1 addition & 1 deletion src/uploaders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ fn verify_tarball(
max_unpack: u64,
) -> CargoResult<()> {
// All our data is currently encoded with gzip
let decoder = GzDecoder::new(tarball)?;
let decoder = GzDecoder::new(tarball);

// Don't let gzip decompression go into the weeeds, apply a fixed cap after
// which point we say the decompressed source is "too large".
Expand Down