upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/repo_ref.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-07-19 12:08:46 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2024-07-19 12:08:46 +0100
commita8b574ae5117939717963304713dd2f1e2929c7d (patch)
tree49c122e73ba5f1a23f6e63e76b53e56cb24c389b /src/repo_ref.rs
parent48ae8d19337954e54101a7e3bd9597c0c9a6b970 (diff)
fix(fetch): absent repo addr infinite loop
prevent an infinite loop when a new maintainer is identified that hasn't issued a repo event yet make it clear when repo_coordinates must not have relays
Diffstat (limited to 'src/repo_ref.rs')
-rw-r--r--src/repo_ref.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/repo_ref.rs b/src/repo_ref.rs
index df348a5..9bc3201 100644
--- a/src/repo_ref.rs
+++ b/src/repo_ref.rs
@@ -178,6 +178,7 @@ impl RepoRef {
178 .await 178 .await
179 .context("failed to create repository reference event") 179 .context("failed to create repository reference event")
180 } 180 }
181 /// coordinates without relay hints
181 pub fn coordinates(&self) -> HashSet<Coordinate> { 182 pub fn coordinates(&self) -> HashSet<Coordinate> {
182 let mut res = HashSet::new(); 183 let mut res = HashSet::new();
183 for m in &self.maintainers { 184 for m in &self.maintainers {
@@ -190,6 +191,7 @@ impl RepoRef {
190 } 191 }
191 res 192 res
192 } 193 }
194 /// coordinates without relay hints
193 pub fn coordinates_with_timestamps(&self) -> Vec<(Coordinate, Option<Timestamp>)> { 195 pub fn coordinates_with_timestamps(&self) -> Vec<(Coordinate, Option<Timestamp>)> {
194 self.coordinates() 196 self.coordinates()
195 .iter() 197 .iter()