Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
clippy: fix large error variant warnings
✗ CI failure Fintan Halpenny committed 10 months ago
commit b02b4b309f175f7312b4565573626c80a67fac65
parent 31840591955988956d66f79f6e739b5382211d30
1 failed 1 pending (2 total) View logs
2 files changed +21 -3
modified crates/radicle-node/src/runtime.rs
@@ -73,7 +73,7 @@ pub enum Error {
    Address(#[from] address::Error),
    /// A service error.
    #[error("service error: {0}")]
-
    Service(#[from] service::Error),
+
    Service(Box<service::Error>),
    /// An I/O error.
    #[error("i/o error: {0}")]
    Io(#[from] io::Error),
@@ -92,6 +92,12 @@ pub enum Error {
    GitVersion(#[from] git::VersionError),
}

+
impl From<service::Error> for Error {
+
    fn from(e: service::Error) -> Self {
+
        Self::Service(Box::new(e))
+
    }
+
}
+

/// Wraps a [`UnixListener`] but tracks its origin.
pub enum ControlSocket {
    /// The listener was created by binding to it.
modified crates/radicle-protocol/src/service.rs
@@ -206,7 +206,13 @@ pub enum Error {
    #[error(transparent)]
    Repository(#[from] radicle::storage::RepositoryError),
    #[error("namespaces error: {0}")]
-
    Namespaces(#[from] NamespacesError),
+
    Namespaces(Box<NamespacesError>),
+
}
+

+
impl From<NamespacesError> for Error {
+
    fn from(e: NamespacesError) -> Self {
+
        Self::Namespaces(Box::new(e))
+
    }
}

#[derive(thiserror::Error, Debug)]
@@ -304,7 +310,13 @@ enum TryFetchError<'a> {
    #[error("peer fetch capacity reached; cannot initiate fetch")]
    SessionCapacityReached,
    #[error(transparent)]
-
    Namespaces(#[from] NamespacesError),
+
    Namespaces(Box<NamespacesError>),
+
}
+

+
impl From<NamespacesError> for TryFetchError<'_> {
+
    fn from(e: NamespacesError) -> Self {
+
        Self::Namespaces(Box::new(e))
+
    }
}

/// Fetch state for an ongoing fetch.