Replace Header::SIZE -> encoded_size()

This commit is contained in:
Ivan Smirnov 2021-12-02 15:57:03 +00:00
parent 0825c0aa3a
commit 02734e4eca

View file

@ -41,7 +41,10 @@ const fn u32_from_be(v: &[u8]) -> u32 {
}
impl Header {
pub const SIZE: usize = QOI_HEADER_SIZE;
#[inline]
pub const fn encoded_size() -> usize {
QOI_HEADER_SIZE
}
#[inline]
pub(crate) fn to_bytes(&self) -> [u8; QOI_HEADER_SIZE] {