Skip to content

Commit

Permalink
Remove mutable reference
Browse files Browse the repository at this point in the history
  • Loading branch information
AgeManning committed Apr 9, 2024
1 parent 2dcc7a8 commit 3bc5cbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ impl<K: EnrKey> Enr<K> {
pub fn get(&self, key: impl AsRef<[u8]>) -> Option<Bytes> {
// It's ok to decode any valid RLP value as data
self.get_raw_rlp(key).map(|mut rlp_data| {
let mut raw_data = &mut rlp_data;
let header = Header::decode(&mut raw_data).expect("All data is sanitized");
let raw_data = &mut rlp_data;
let header = Header::decode(raw_data).expect("All data is sanitized");
raw_data[..header.payload_length].to_vec().into()
})
}
Expand Down

0 comments on commit 3bc5cbb

Please sign in to comment.