mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 14:00:31 +08:00
fetch: Remove dead code from DataRefs
This commit is contained in:
@@ -477,19 +477,17 @@ impl ProtocolStage for SigrefsAt {
|
||||
/// any that were found to exist before the latest fetch.
|
||||
#[derive(Debug)]
|
||||
pub struct DataRefs {
|
||||
/// The node that is being fetched from.
|
||||
#[allow(dead_code)]
|
||||
pub remote: PublicKey,
|
||||
/// The set of signed references from each remote that was
|
||||
/// fetched.
|
||||
pub remotes: RemoteRefs,
|
||||
/// The data limit for this stage of fetching.
|
||||
#[allow(dead_code)]
|
||||
pub limit: u64,
|
||||
remotes: RemoteRefs,
|
||||
}
|
||||
|
||||
impl DataRefs {
|
||||
pub(crate) fn into_remote_refs(self) -> RemoteRefs {
|
||||
pub(crate) fn new(remotes: RemoteRefs) -> Self {
|
||||
Self { remotes }
|
||||
}
|
||||
|
||||
pub(crate) fn into_inner(self) -> RemoteRefs {
|
||||
self.remotes
|
||||
}
|
||||
}
|
||||
|
||||
@@ -425,11 +425,7 @@ impl FetchState {
|
||||
start.elapsed().as_millis()
|
||||
);
|
||||
|
||||
let data_refs = stage::DataRefs {
|
||||
remote,
|
||||
remotes: signed_refs,
|
||||
limit: limit.refs,
|
||||
};
|
||||
let data_refs = stage::DataRefs::new(signed_refs);
|
||||
let fetched = self.run_stage(handle, handshake, &data_refs)?;
|
||||
log::debug!(
|
||||
"Fetched data refs for {} remotes ({}ms)",
|
||||
@@ -452,7 +448,7 @@ impl FetchState {
|
||||
// repository.
|
||||
let mut failures = sigrefs::Validations::default();
|
||||
|
||||
let signed_refs = data_refs.into_remote_refs();
|
||||
let signed_refs = data_refs.into_inner();
|
||||
|
||||
// We may prune fetched remotes, so we keep track of
|
||||
// non-pruned, fetched remotes here.
|
||||
|
||||
Reference in New Issue
Block a user