Skip to content

Commit

Permalink
refactor(pointer_address): replace bincode with rmp_serde for seriali…
Browse files Browse the repository at this point in the history
…zation
  • Loading branch information
dirvine committed Dec 29, 2024
1 parent 3c77da9 commit 036e2cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ant-protocol/src/storage/address/pointer_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ impl PointerAddress {
}

pub fn to_bytes(&self) -> Vec<u8> {
bincode::serialize(self).expect("Failed to serialize PointerAddress")
rmp_serde::to_vec(self).expect("Failed to serialize PointerAddress")
}

pub fn from_bytes(bytes: &[u8]) -> Result<Self, rmp_serde::decode::Error> {
rmp_serde::from_slice(bytes)
}
}

Expand Down

0 comments on commit 036e2cb

Please sign in to comment.