Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
REVIEW: return an Iterator
✗ CI failure Fintan Halpenny committed 6 months ago
commit fbcad647275e0f19b3379a4be1d709b173b1976f
parent a066120e59de612bd2fb7344eab04cb3c526a736
1 failed 1 pending (2 total) View logs
1 file changed +6 -4
modified crates/radicle/src/storage/git.rs
@@ -236,10 +236,13 @@ impl Storage {
        self.path.as_path()
    }

-
    pub fn repositories_by_id<'a>(
+
    pub fn repositories_by_id<'a, I>(
        &self,
-
        rids: impl Iterator<Item = &'a RepoId>,
-
    ) -> Vec<Result<RepositoryInfo, RepositoryError>> {
+
        rids: I,
+
    ) -> impl Iterator<Item = Result<RepositoryInfo, RepositoryError>> + use<'_, 'a, I>
+
    where
+
        I: Iterator<Item = &'a RepoId>,
+
    {
        rids.map(|rid| {
            let repo = self.repository(*rid)?;
            let (_, head) = repo.head()?;
@@ -257,7 +260,6 @@ impl Storage {
                synced_at,
            })
        })
-
        .collect()
    }

    pub fn inspect(&self) -> Result<(), RepositoryError> {