From 02734e4eca5850973af8b2dd1f36faed682dbdb4 Mon Sep 17 00:00:00 2001 From: Ivan Smirnov Date: Thu, 2 Dec 2021 15:57:03 +0000 Subject: [PATCH] Replace Header::SIZE -> encoded_size() --- src/header.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/header.rs b/src/header.rs index 2e38d5e..b22a14f 100644 --- a/src/header.rs +++ b/src/header.rs @@ -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] {