Closed yangby-cryptape closed 2 years ago
Bytes::from_static(..) is a const function, we can use it in the default constructor for entities to improve the performance.
Bytes::from_static(..)
Ref: pub const fn from_static(bytes: &'static [u8]) -> Bytes.
pub const fn from_static(bytes: &'static [u8]) -> Bytes
Bytes::from_static(..)
is a const function, we can use it in the default constructor for entities to improve the performance.Ref:
pub const fn from_static(bytes: &'static [u8]) -> Bytes
.