From 3bd89a171f3056aa571992fe9f57e4b693e0c899 Mon Sep 17 00:00:00 2001 From: BGluth Date: Tue, 20 Feb 2024 14:24:10 -1000 Subject: [PATCH] Apply suggestions from code review Nashtare's suggested changes for #39. Co-authored-by: Robin Salen <30937548+Nashtare@users.noreply.github.com> --- mpt_trie/src/special_query.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpt_trie/src/special_query.rs b/mpt_trie/src/special_query.rs index 329726772..503331aa0 100644 --- a/mpt_trie/src/special_query.rs +++ b/mpt_trie/src/special_query.rs @@ -81,8 +81,8 @@ impl Iterator for TriePathIter { } } -/// 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)