diff options
Diffstat (limited to 'src/packet.rs')
-rw-r--r-- | src/packet.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/packet.rs b/src/packet.rs index 3906dbb6..83a220af 100644 --- a/src/packet.rs +++ b/src/packet.rs @@ -140,13 +140,13 @@ enum ConnectionIdInner<'a> { impl<'a> ConnectionId<'a> { /// Creates a new connection ID from the given vector. #[inline] - pub fn from_vec(cid: Vec<u8>) -> Self { + pub const fn from_vec(cid: Vec<u8>) -> Self { Self(ConnectionIdInner::Vec(cid)) } /// Creates a new connection ID from the given slice. #[inline] - pub fn from_ref(cid: &'a [u8]) -> Self { + pub const fn from_ref(cid: &'a [u8]) -> Self { Self(ConnectionIdInner::Ref(cid)) } } |