Skip to content

Commit

Permalink
Merge pull request #56 from oOBoomberOo/master
Browse files Browse the repository at this point in the history
Upgrade flate2 to 1.0
  • Loading branch information
atheriel authored Aug 17, 2020
2 parents 2494c1d + 8f6cf2a commit 4697271
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bench = false
[dependencies]
byteorder = "1.0.0"
cesu8 = "1.1.0"
flate2 = "0.2"
flate2 = "1.0.16"
indexmap = { version = "1.4", optional = true, features = ["serde-1"] }
serde = { version = "1.0", optional = true, features = ["derive"] }

Expand Down
6 changes: 3 additions & 3 deletions src/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ impl Blob {
R: io::Read,
{
// Reads the gzip header, and fails if it is incorrect.
let mut data = GzDecoder::new(src)?;
let mut data = GzDecoder::new(src);
Blob::from_reader(&mut data)
}

Expand Down Expand Up @@ -125,7 +125,7 @@ impl Blob {
where
W: io::Write,
{
self.to_writer(&mut GzEncoder::new(dst, Compression::Default))
self.to_writer(&mut GzEncoder::new(dst, Compression::default()))
}

/// Writes the binary representation of this `Blob`, compressed using
Expand All @@ -134,7 +134,7 @@ impl Blob {
where
W: io::Write,
{
self.to_writer(&mut ZlibEncoder::new(dst, Compression::Default))
self.to_writer(&mut ZlibEncoder::new(dst, Compression::default()))
}

/// Insert an `Value` with a given name into this `Blob` object. This
Expand Down
2 changes: 1 addition & 1 deletion src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ where
R: io::Read,
T: de::DeserializeOwned,
{
let gzip = read::GzDecoder::new(src)?;
let gzip = read::GzDecoder::new(src);
from_reader(gzip)
}

Expand Down
4 changes: 2 additions & 2 deletions src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ where
W: ?Sized + io::Write,
T: ?Sized + ser::Serialize,
{
let mut encoder = Encoder::new(GzEncoder::new(dst, Compression::Default), header);
let mut encoder = Encoder::new(GzEncoder::new(dst, Compression::default()), header);
value.serialize(&mut encoder)
}

Expand All @@ -42,7 +42,7 @@ where
W: ?Sized + io::Write,
T: ?Sized + ser::Serialize,
{
let mut encoder = Encoder::new(ZlibEncoder::new(dst, Compression::Default), header);
let mut encoder = Encoder::new(ZlibEncoder::new(dst, Compression::default()), header);
value.serialize(&mut encoder)
}

Expand Down

0 comments on commit 4697271

Please sign in to comment.