Skip to content

Commit

Permalink
chore: Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus23 committed Feb 15, 2024
1 parent 5b883db commit 7c00b7d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions car-mirror/src/dag_walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,10 @@ impl DagWalk {

fn frontier_next(&mut self) -> Option<Cid> {
loop {
let popped = if self.breadth_first {
self.frontier.pop_back()
let cid = if self.breadth_first {
self.frontier.pop_back()?
} else {
self.frontier.pop_front()
};

let Some(cid) = popped else {
return None;
self.frontier.pop_front()?
};

// We loop until we find an unvisited block
Expand Down

0 comments on commit 7c00b7d

Please sign in to comment.