Skip to content

Commit

Permalink
refactor hld
Browse files Browse the repository at this point in the history
  • Loading branch information
ngtkana committed Jun 24, 2024
1 parent 1e1e5c3 commit 303037a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions libs/hld/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,13 @@ impl Iterator for PathSegments<'_> {
type Item = (usize, usize, bool, bool);

fn next(&mut self) -> Option<Self::Item> {
(!self.exhausted).then_some(())?;
let Self { hld, from, to, .. } = *self;
let Self {
hld,
from,
to,
exhausted,
} = *self;
(!exhausted).then_some(())?;
let Hld {
index,
head,
Expand Down

0 comments on commit 303037a

Please sign in to comment.