From 6723e17602ce29609b7c8f42dd5d876fc9698198 Mon Sep 17 00:00:00 2001 From: citorva <16229435+citorva@users.noreply.github.com> Date: Wed, 27 Mar 2024 23:06:59 +0100 Subject: [PATCH] Fix compilation error when using without theflate2 feature --- russh/src/compression.rs | 4 ++-- russh/src/lib.rs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/russh/src/compression.rs b/russh/src/compression.rs index 32ffad6b..6a63c2f0 100644 --- a/russh/src/compression.rs +++ b/russh/src/compression.rs @@ -71,7 +71,7 @@ impl Compress { &mut self, input: &'a [u8], _: &'a mut russh_cryptovec::CryptoVec, - ) -> Result<&'a [u8], Error> { + ) -> Result<&'a [u8], crate::Error> { Ok(input) } } @@ -82,7 +82,7 @@ impl Decompress { &mut self, input: &'a [u8], _: &'a mut russh_cryptovec::CryptoVec, - ) -> Result<&'a [u8], Error> { + ) -> Result<&'a [u8], crate::Error> { Ok(input) } } diff --git a/russh/src/lib.rs b/russh/src/lib.rs index 0c66a850..66bea0e3 100644 --- a/russh/src/lib.rs +++ b/russh/src/lib.rs @@ -284,9 +284,11 @@ pub enum Error { Utf8(#[from] std::str::Utf8Error), #[error(transparent)] + #[cfg(feature = "flate2")] Compress(#[from] flate2::CompressError), #[error(transparent)] + #[cfg(feature = "flate2")] Decompress(#[from] flate2::DecompressError), #[error(transparent)]