Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
REVIEW: Simplify this match
Lorenz Leutgeb committed 9 months ago
commit f33c46dd82fb153dba6d679b7a3b84865bd9de73
parent 2265a61c41aee8273fb7a593e81850e863cc7b53
1 file changed +2 -8
modified crates/radicle/src/git/canonical/convergence.rs
@@ -109,13 +109,8 @@ impl Candidate {
            return ControlFlow::Continue(Effect::SkipSelf);
        }
        match (self.object, object) {
-
            (e @ Object::Commit { .. }, f @ Object::Tag { .. }) => {
-
                ControlFlow::Break(ConvergenceMismatch {
-
                    expected: e,
-
                    found: f,
-
                })
-
            }
-
            (e @ Object::Tag { .. }, f @ Object::Commit { .. }) => {
+
            (e @ Object::Commit { .. }, f @ Object::Tag { .. })
+
            | (e @ Object::Tag { .. }, f @ Object::Commit { .. }) => {
                ControlFlow::Break(ConvergenceMismatch {
                    expected: e,
                    found: f,
@@ -124,7 +119,6 @@ impl Candidate {
            (Object::Commit { id: commit }, Object::Commit { id: upstream }) => {
                ControlFlow::Continue(Effect::GraphCheck { commit, upstream })
            }
-

            (Object::Tag { .. }, Object::Tag { .. }) => ControlFlow::Continue(Effect::TagConverges),
        }
    }