From 92fbdc78be45a93494edc826bddb5e939c8185cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=C3=ADn=20Dufka?= Date: Fri, 10 May 2024 16:37:07 +0200 Subject: [PATCH] fix: restore conditional build without protocols --- src/c_api.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/c_api.rs b/src/c_api.rs index 3f12b54..3e94704 100644 --- a/src/c_api.rs +++ b/src/c_api.rs @@ -29,6 +29,7 @@ pub enum Recipient { Server, } +#[cfg(feature = "protocol")] impl From for Recipient { fn from(value: protocol::Recipient) -> Self { match value { @@ -89,10 +90,12 @@ pub unsafe extern "C" fn error_free(error: *mut c_char) { } pub struct Protocol { + #[cfg(feature = "protocol")] instances: Vec>, } impl Protocol { + #[cfg(feature = "protocol")] fn wrap(instances: Vec>) -> *mut Self { Box::into_raw(Box::new(Protocol { instances })) }