mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-30 02:01:35 +00:00
fix closest lgos
This commit is contained in:
@ -400,10 +400,11 @@ impl Iterator for ClosestBucketsIter {
|
||||
Some(i)
|
||||
}
|
||||
ClosestBucketsIterState::ZoomIn(i) => {
|
||||
let old_i = i.0;
|
||||
if let Some(i) = self.next_in(i) {
|
||||
println!(
|
||||
"ClosestBucketsIter: distance = {}; ZoomIn({}) -> ZoomIn({})",
|
||||
self.distance.0, i.0, i.0
|
||||
self.distance.0, old_i, i.0
|
||||
);
|
||||
self.state = ClosestBucketsIterState::ZoomIn(i);
|
||||
Some(i)
|
||||
@ -418,10 +419,11 @@ impl Iterator for ClosestBucketsIter {
|
||||
}
|
||||
}
|
||||
ClosestBucketsIterState::ZoomOut(i) => {
|
||||
let old_i = i.0;
|
||||
if let Some(i) = self.next_out(i) {
|
||||
println!(
|
||||
"ClosestBucketsIter: distance = {}; ZoomOut({}) -> ZoomOut({})",
|
||||
self.distance.0, i.0, i.0
|
||||
self.distance.0, old_i, i.0
|
||||
);
|
||||
self.state = ClosestBucketsIterState::ZoomOut(i);
|
||||
Some(i)
|
||||
|
Reference in New Issue
Block a user