Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/trie/sparse/src/trie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ impl SparseTrieInterface for SerialSparseTrie {
expected_value: Option<&Vec<u8>>,
) -> Result<LeafLookup, LeafLookupError> {
// Helper function to check if a value matches the expected value
#[inline]
fn check_value_match(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just add an #[inline] attribute here? It doesn't clone the value unless the error is returned anyway, as @mediocregopher said.

actual_value: &Vec<u8>,
expected_value: Option<&Vec<u8>>,
Expand Down