From 101940335cba5b3dd5a7058f829370057c5542b8 Mon Sep 17 00:00:00 2001 From: Andreas Molzer Date: Wed, 20 Nov 2019 19:56:13 +0100 Subject: [PATCH] Fix public constructor from miniz_oxide status Avoids leaking the dependency on `miniz_oxide` into the public interface by making a constructor taking a status argument crate internal. It would otherwise not be possible to replace the deflate decoder without breaking that interface. --- src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index 6c6021b..95b3435 100644 --- a/src/error.rs +++ b/src/error.rs @@ -68,7 +68,7 @@ pub struct InflateError { } impl InflateError { - pub fn new(status: TINFLStatus) -> Self { + pub(crate) fn new(status: TINFLStatus) -> Self { Self { status } } }