fetch: Remove dead code from `DataRefs`
This commit is contained in:
parent
725ced09d5
commit
363a7231e5
|
|
@ -477,19 +477,17 @@ impl ProtocolStage for SigrefsAt {
|
||||||
/// any that were found to exist before the latest fetch.
|
/// any that were found to exist before the latest fetch.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct DataRefs {
|
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
|
/// The set of signed references from each remote that was
|
||||||
/// fetched.
|
/// fetched.
|
||||||
pub remotes: RemoteRefs,
|
remotes: RemoteRefs,
|
||||||
/// The data limit for this stage of fetching.
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub limit: u64,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DataRefs {
|
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
|
self.remotes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -425,11 +425,7 @@ impl FetchState {
|
||||||
start.elapsed().as_millis()
|
start.elapsed().as_millis()
|
||||||
);
|
);
|
||||||
|
|
||||||
let data_refs = stage::DataRefs {
|
let data_refs = stage::DataRefs::new(signed_refs);
|
||||||
remote,
|
|
||||||
remotes: signed_refs,
|
|
||||||
limit: limit.refs,
|
|
||||||
};
|
|
||||||
let fetched = self.run_stage(handle, handshake, &data_refs)?;
|
let fetched = self.run_stage(handle, handshake, &data_refs)?;
|
||||||
log::debug!(
|
log::debug!(
|
||||||
"Fetched data refs for {} remotes ({}ms)",
|
"Fetched data refs for {} remotes ({}ms)",
|
||||||
|
|
@ -452,7 +448,7 @@ impl FetchState {
|
||||||
// repository.
|
// repository.
|
||||||
let mut failures = sigrefs::Validations::default();
|
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
|
// We may prune fetched remotes, so we keep track of
|
||||||
// non-pruned, fetched remotes here.
|
// non-pruned, fetched remotes here.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue