Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
REVIEW
Fintan Halpenny committed 7 months ago
commit 0d9aba770b3671282f06f197afc84921d1dcb193
parent 61ead6356bc3d8b18ceab023ecd70880a9c8ae1b
2 files changed +3 -3
modified crates/radicle/src/git/canonical/symbolic.rs
@@ -153,7 +153,7 @@ impl SymbolicRefs {
    }

    /// Consume `other` by iteratively inserting into self.
-
    pub fn extend(&mut self, other: SymbolicRefs) -> Result<(), InsertionError> {
+
    pub fn combine(&mut self, other: SymbolicRefs) -> Result<(), InsertionError> {
        for (name, target) in other.0 {
            self.try_insert_unprotected(name, target)?;
        }
@@ -319,6 +319,6 @@ mod test {
        let mut b = SymbolicRefs::default();
        assert_matches!(b.try_insert(refname!("b"), refname!("a")), Ok(()));

-
        assert_matches!(a.extend(b), Err(InsertionError::Cyclic { .. }));
+
        assert_matches!(a.combine(b), Err(InsertionError::Cyclic { .. }));
    }
}
modified crates/radicle/src/identity/doc.rs
@@ -850,7 +850,7 @@ impl Doc {

        raw_crefs
            .symbolic_mut()
-
            .extend(symbolic::SymbolicRefs::head(project.default_branch()))?;
+
            .combine(symbolic::SymbolicRefs::head(project.default_branch()))?;

        Ok(raw_crefs.try_into_canonical_refs(resolve)?)
    }