Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
REVIEW: Make clippy happy, too
◌ CI pending Lorenz Leutgeb committed 9 months ago
commit b155828c29a819435b1d494d4ab4cccaa4df6b71
parent d9e62b75d478d222984bc8560f35907f383a9f0b
1 pending (1 total) View logs
2 files changed +4 -4
modified crates/radicle/src/git/canonical.rs
@@ -374,9 +374,7 @@ impl MergeBase {
    /// Collapses a non-trivial and linear result of a merge base computation
    /// into a single commit, if possible.
    pub fn linear(self) -> Option<Oid> {
-
        if self.is_trivial() {
-
            None
-
        } else if self.a != self.base && self.b != self.base {
+
        if self.is_trivial() || (self.a != self.base && self.b != self.base) {
            None
        } else {
            Some(self.base)
modified crates/radicle/src/git/canonical/voting.rs
@@ -76,7 +76,9 @@ impl CommitVoting {
    /// result.
    pub fn found_merge_base(&mut self, merge_base: MergeBase) {
        // Avoid double counting the same commits
-
        merge_base.linear().map(|oid| self.votes.vote(oid));
+
        if let Some(oid) = merge_base.linear() {
+
            self.votes.vote(oid)
+
        }
    }

    /// Finish the voting process and get the [`Votes`] from the