From 0a3455ce48ad5de41a10a9b632ce7e413a91d76d Mon Sep 17 00:00:00 2001 From: BGluth Date: Fri, 2 Sep 2022 16:18:54 -0700 Subject: [PATCH] Added a few derives to `Trie` types - A downstream project needed `Hash` on `Nibbles`, but I also thought it made sense to derive a few other core types as well. --- evm/src/generation/partial_trie.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/evm/src/generation/partial_trie.rs b/evm/src/generation/partial_trie.rs index 96751310..5e52e1e0 100644 --- a/evm/src/generation/partial_trie.rs +++ b/evm/src/generation/partial_trie.rs @@ -1,5 +1,6 @@ use ethereum_types::U256; +#[derive(Clone, Debug)] /// A partial trie, or a sub-trie thereof. This mimics the structure of an Ethereum trie, except /// with an additional `Hash` node type, representing a node whose data is not needed to process /// our transaction. @@ -22,6 +23,7 @@ pub enum PartialTrie { Leaf { nibbles: Nibbles, value: Vec }, } +#[derive(Copy, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] /// A sequence of nibbles. pub struct Nibbles { /// The number of nibbles in this sequence.