From 9a8125767990a4de2b1dcbab622bcd22078bf197 Mon Sep 17 00:00:00 2001 From: Tomasz Pietrek Date: Tue, 9 Apr 2024 13:45:29 +0200 Subject: [PATCH] Fix build if default features are disabled Signed-off-by: Tomasz Pietrek --- async-nats/src/jetstream/context.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/async-nats/src/jetstream/context.rs b/async-nats/src/jetstream/context.rs index a978943ac..1c7e5ec5d 100644 --- a/async-nats/src/jetstream/context.rs +++ b/async-nats/src/jetstream/context.rs @@ -41,9 +41,11 @@ use super::errors::ErrorCode; use super::is_valid_name; use super::kv::{Store, MAX_HISTORY}; use super::object_store::{is_valid_bucket_name, ObjectStore}; +#[cfg(feature = "server_2_10")] +use super::stream::Compression; use super::stream::{ - self, Compression, Config, ConsumerError, ConsumerErrorKind, DeleteStatus, DiscardPolicy, - External, Info, Stream, + self, Config, ConsumerError, ConsumerErrorKind, DeleteStatus, DiscardPolicy, External, Info, + Stream, }; /// A context which can perform jetstream scoped requests. @@ -1045,6 +1047,7 @@ impl Context { discard: DiscardPolicy::New, allow_rollup: true, allow_direct: true, + #[cfg(feature = "server_2_10")] compression: if config.compression { Some(Compression::S2) } else {