Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Nashtare's suggested changes for 0xPolygonZero#39.

Co-authored-by: Robin Salen <[email protected]>
  • Loading branch information
BGluth and Nashtare authored Feb 21, 2024
1 parent 0a8c16d commit 3bd89a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mpt_trie/src/special_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ impl<T: PartialTrie> Iterator for TriePathIter<T> {
}
}

/// Attempt to pop `n` nibbles from the given [`Nibbles`] and "clamp" the
/// nibbles popped by not popping more nibbles than exist.
/// Attempts to pop `n` nibbles from the given [`Nibbles`] and "clamp" the
/// nibbles popped by not popping more nibbles than there are.
fn pop_nibbles_clamped(nibbles: &mut Nibbles, n: usize) -> Nibbles {
let n_nibs_to_pop = nibbles.count.min(n);
nibbles.pop_nibbles_front(n_nibs_to_pop)
Expand Down

0 comments on commit 3bd89a1

Please sign in to comment.