From 4887a0529530a99d1bc5f68d14fefa8e138604fe Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Wed, 11 Sep 2024 01:17:53 +0100 Subject: [PATCH] Couple more fixes --- src/errors.rs | 1 + src/response.rs | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/errors.rs b/src/errors.rs index dc6c216..5cc236d 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -202,6 +202,7 @@ impl ASCOMError { } /// Create a new error with unspecified error code and the given message. + #[cfg(feature = "client")] pub(crate) fn unspecified(message: impl std::fmt::Display) -> Self { Self::new(ASCOMErrorCode::UNSPECIFIED, message) } diff --git a/src/response.rs b/src/response.rs index f655a91..c6857e7 100644 --- a/src/response.rs +++ b/src/response.rs @@ -6,14 +6,12 @@ pub(crate) struct ValueResponse { value: T, } -#[cfg(feature = "server")] impl From for ValueResponse { fn from(value: T) -> Self { Self { value } } } -#[cfg(feature = "client")] impl ValueResponse { pub(crate) fn into(self) -> T { self.value