diff --git a/aya/src/maps/lpm_trie.rs b/aya/src/maps/lpm_trie.rs index 40d91f4c..1ba65fc1 100644 --- a/aya/src/maps/lpm_trie.rs +++ b/aya/src/maps/lpm_trie.rs @@ -32,7 +32,6 @@ pub struct LpmTrie, K, V> { _v: PhantomData, } -#[derive(Clone, Copy)] #[repr(packed)] pub struct Key { pub key_base: bpf_lpm_trie_key, @@ -51,6 +50,14 @@ impl Key { } } +impl Copy for Key { } + +impl Clone for Key { + fn clone(&self) -> Self { + *self + } +} + // A Pod impl is required as bpf_lpm_trie_key is a key for a map. unsafe impl Pod for Key {}