Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
fetch: move `Component::from` outside of loop
✗ CI failure Fintan Halpenny committed 2 months ago
commit a6f32c0aef40b82a70c1b1c76135331ca7d8f487
parent 5fa68ed81499f6b887bcda74fb1bb5c80926f7f2
1 failed (1 total) View logs
1 file changed +2 -2
modified crates/radicle-fetch/src/git/mem.rs
@@ -26,10 +26,10 @@ impl Refdb {
        &'a self,
        remote: &'a PublicKey,
    ) -> impl Iterator<Item = (RefString, Oid)> + 'a {
+
        let remote = Component::from(remote);
        self.0.iter().filter_map(move |(refname, oid)| {
            let ns = refname.to_namespaced()?;
-
            (ns.namespace() == Component::from(remote))
-
                .then(|| (ns.strip_namespace().to_ref_string(), *oid))
+
            (ns.namespace() == remote).then(|| (ns.strip_namespace().to_ref_string(), *oid))
        })
    }