Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle: Fix clippy::result_large_err
Lorenz Leutgeb committed 9 months ago
commit fdb1ac4e3a01030ab4eb4415db68d5bc1c719718
parent 5bab3f9cc02d6337e2cc9eb068bca60e6e7a91c7
1 file changed +3 -3
modified crates/radicle/src/cob/patch.rs
@@ -129,7 +129,7 @@ pub enum Error {
    Op(#[from] op::OpEncodingError),
    /// Action not authorized by the author
    #[error("{0} not authorized to apply {1:?}")]
-
    NotAuthorized(ActorId, Action),
+
    NotAuthorized(ActorId, Box<Action>),
    /// An illegal action.
    #[error("action is not allowed: {0}")]
    NotAllowed(EntryId),
@@ -783,7 +783,7 @@ impl Patch {
            Authorization::Allow => {
                self.action(action, id, author, timestamp, concurrent, doc, repo)
            }
-
            Authorization::Deny => Err(Error::NotAuthorized(author, action)),
+
            Authorization::Deny => Err(Error::NotAuthorized(author, Box::new(action))),
            Authorization::Unknown => {
                // In this case, since there is not enough information to determine
                // whether the action is authorized or not, we simply ignore it.
@@ -1228,7 +1228,7 @@ impl store::Cob for Patch {
                    patch.action(action, op.id, op.author, op.timestamp, &[], &doc, repo)?;
                }
                Authorization::Deny => {
-
                    return Err(Error::NotAuthorized(op.author, action));
+
                    return Err(Error::NotAuthorized(op.author, Box::new(action)));
                }
                Authorization::Unknown => {
                    // Note that this shouldn't really happen since there's no concurrency in the