Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
refactor: make BrokerError::NotTrigger not be so large
Lars Wirzenius committed 1 year ago
commit 320c426904887adefb6376067fca436651151a1f
parent 145e061affb30bfe851a5ff13b191c27948f05bb
5 files changed +1 -6
modified src/bin/cib.rs
@@ -273,7 +273,6 @@ impl ProcessEventsCmd {
}

#[derive(Debug, thiserror::Error)]
-
#[allow(clippy::large_enum_variant)]
enum CibError {
    #[error("failed to read configuration file {0}")]
    ReadConfig(PathBuf, #[source] ConfigError),
modified src/bin/cibtool.rs
@@ -240,7 +240,6 @@ enum RunSubCmd {
}

#[derive(Debug, thiserror::Error)]
-
#[allow(clippy::large_enum_variant)]
enum CibToolError {
    #[error("failed to look up node profile")]
    Profile(#[source] radicle::profile::Error),
modified src/broker.rs
@@ -127,7 +127,6 @@ fn now() -> Result<String, time::error::Format> {

/// All possible errors from this module.
#[derive(Debug, thiserror::Error)]
-
#[allow(clippy::large_enum_variant)]
pub enum BrokerError {
    /// Error formatting a time as a string.
    #[error(transparent)]
@@ -151,7 +150,7 @@ pub enum BrokerError {

    /// Request is not a trigger message.
    #[error("tried to execute CI based on a message that is not a trigger one: {0:#?}")]
-
    NotTrigger(Request),
+
    NotTrigger(Box<Request>),

    /// Could not convert repository ID from string.
    #[error("failed to understand repository id {0:?}")]
modified src/queueproc.rs
@@ -170,7 +170,6 @@ impl QueueProcessor {
}

#[derive(Debug, thiserror::Error)]
-
#[allow(clippy::large_enum_variant)]
pub enum QueueError {
    #[error("failed to load node profile")]
    Profile(#[source] radicle::profile::Error),
modified src/util.rs
@@ -89,7 +89,6 @@ pub fn now() -> Result<String, UtilError> {
}

#[derive(Debug, thiserror::Error)]
-
#[allow(clippy::large_enum_variant)]
pub enum UtilError {
    #[error("failed to look up node profile")]
    Profile(#[source] radicle::profile::Error),