diff --git a/Cargo.toml b/Cargo.toml index d49e9258..5aeba7f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "png" -version = "0.17.15" +version = "0.17.16" license = "MIT OR Apache-2.0" description = "PNG decoding and encoding library in pure Rust" @@ -36,12 +36,15 @@ getopts = "0.2.14" glium = { version = "0.32", features = ["glutin"], default-features = false } glob = "0.3" rand = "0.8.4" -term = "0.7" +term = "1.0.1" [features] unstable = ["crc32fast/nightly"] benchmarks = [] +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } + [[bench]] path = "benches/decoder.rs" name = "decoder" diff --git a/src/common.rs b/src/common.rs index 36ad78b6..cb56e6e7 100644 --- a/src/common.rs +++ b/src/common.rs @@ -740,6 +740,7 @@ impl Info<'_> { /// /// Note that this does _not_ include the PNG signature, it starts with the IHDR chunk and then /// includes other chunks that were added to the header. + #[deprecated(note = "Use Encoder+Writer instead")] pub fn encode(&self, mut w: W) -> encoder::Result<()> { // Encode the IHDR chunk let mut data = [0; 13]; diff --git a/src/encoder.rs b/src/encoder.rs index 9f275e5e..c143fa04 100644 --- a/src/encoder.rs +++ b/src/encoder.rs @@ -590,6 +590,7 @@ impl Writer { } self.w.write_all(&[137, 80, 78, 71, 13, 10, 26, 10])?; // PNG signature + #[allow(deprecated)] info.encode(&mut self.w)?; Ok(self)