mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 05:50:31 +08:00
radicle/cob/identity: Add SiblingAccepted error variant
Add an `ApplyError` for variant, `SiblingAccepted`, to use to enforce the new invariant: delegates must not accept active, sibling revisions.
This commit is contained in:
committed by
Adrian Duke
parent
654218e6a5
commit
7daeb3135b
@@ -501,6 +501,7 @@ fn on_apply_err(e: &identity::ApplyError, profile: &Profile) -> anyhow::Error {
|
||||
| e @ radicle::cob::identity::ApplyError::MissingParent
|
||||
| e @ radicle::cob::identity::ApplyError::DuplicateVerdict
|
||||
| e @ radicle::cob::identity::ApplyError::UnexpectedState
|
||||
| e @ radicle::cob::identity::ApplyError::SiblingAccepted
|
||||
| e @ radicle::cob::identity::ApplyError::DocUnchanged
|
||||
| e @ radicle::cob::identity::ApplyError::Git(_)
|
||||
| e @ radicle::cob::identity::ApplyError::Doc(_)
|
||||
|
||||
@@ -122,6 +122,8 @@ pub enum ApplyError {
|
||||
DuplicateVerdict,
|
||||
#[error("revision is in an unexpected state")]
|
||||
UnexpectedState,
|
||||
#[error("delegate already accepted a sibling revision '{revision}'")]
|
||||
SiblingAccepted { revision: RevisionId },
|
||||
#[error("document does not contain any changes to current identity")]
|
||||
DocUnchanged,
|
||||
#[error("git: {0}")]
|
||||
|
||||
Reference in New Issue
Block a user