fix: compilation with --no-default-features (#593)

This commit is contained in:
Evgenii 2026-02-04 01:21:06 +01:00 • committed by GitHub
commit 53b64a9f87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,5 @@
use std::{borrow::Cow, fmt::Display};
use crate::ServiceError;
pub use crate::model::ErrorData;
#[deprecated(
note = "Use `rmcp::ErrorData` instead, `rmcp::ErrorData` could become `RmcpError` in the future."
@ -22,8 +21,9 @@ impl std::error::Error for ErrorData {}
#[derive(Debug, thiserror::Error)]
#[allow(clippy::large_enum_variant)]
pub enum RmcpError {
#[cfg(any(feature = "client", feature = "server"))]
#[error("Service error: {0}")]
Service(#[from] ServiceError),
Service(#[from] crate::ServiceError),
#[cfg(feature = "client")]
#[error("Client initialization error: {0}")]
ClientInitialize(#[from] crate::service::ClientInitializeError),