protocol/fetcher: Intro RefsToFetch

Using empty `Vec`s to mean "all refs" can be confusing. Avoid the chance
of confusion by introduction of a new type that clearly describes which
refs should be fetched.
This commit is contained in:
Lorenz Leutgeb
2026-02-13 15:27:21 +01:00
parent 9081c11b98
commit 865abd35e2
20 changed files with 263 additions and 195 deletions
+2 -2
View File
@@ -359,7 +359,7 @@ impl radicle::node::Handle for Handle {
json!({
"rid": rid,
"from": active.from(),
"refsAt": active.refs_at(),
"refsAt": active.refs(),
})
}).collect::<Vec<_>>(),
"queue": fetcher_state.queued_fetches().iter().map(|(node, queue)| {
@@ -368,7 +368,7 @@ impl radicle::node::Handle for Handle {
"queue": queue.iter().map(|fetch| {
json!({
"rid": fetch.rid,
"refsAt": fetch.refs_at,
"refsAt": fetch.refs,
})
}).collect::<Vec<_>>()
})