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 5ad195ca83d553c714b27dc504026da54e9dc1c1
parent 4910c5f03beefe20d7a1dea9e0c986de867987b5
1 file changed +4 -2
modified crates/radicle/src/git/canonical/symbolic.rs
@@ -35,15 +35,17 @@ impl std::cmp::Ord for Name {
}

impl SymbolicRefs {
+
    /// Get the [`Target`] of a symbolic reference, given its [`Name`].
    pub fn get(&self, key: &Name) -> Option<&Target> {
        self.0.get(key)
    }

-
    // Convenience method to get `HEAD`.
+
    /// Convenience method to get the [`Target`] of the `HEAD` reference.
    pub fn get_head(&self) -> Option<&Target> {
-
        self.0.get(&Unprotected::head())
+
        self.get(&Unprotected::head())
    }

+
    /// Returns `true` if the set of symbolic references is empty.
    pub fn is_empty(&self) -> bool {
        self.0.is_empty()
    }