diff --git a/crates/scion-proto/src/packet/headers/common_header.rs b/crates/scion-proto/src/packet/headers/common_header.rs index c5de010..65a5b17 100644 --- a/crates/scion-proto/src/packet/headers/common_header.rs +++ b/crates/scion-proto/src/packet/headers/common_header.rs @@ -107,7 +107,7 @@ impl CommonHeader { /// The payload length as a usize. pub fn payload_size(&self) -> usize { - usize::try_from(self.payload_length).expect("usize to be larger than 16-bits") + usize::from(self.payload_length) } }