From 5b797cf52e452370b8a8b46dbba3e6248f391d72 Mon Sep 17 00:00:00 2001 From: ChanTsune <41658782+ChanTsune@users.noreply.github.com> Date: Sat, 18 Nov 2023 14:13:34 +0900 Subject: [PATCH] :boom: Change `EntryBuilder::build` return type `impl Entry` to `RegularEntry` --- lib/src/archive/entry/builder.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/src/archive/entry/builder.rs b/lib/src/archive/entry/builder.rs index 841dd50d..25f98309 100644 --- a/lib/src/archive/entry/builder.rs +++ b/lib/src/archive/entry/builder.rs @@ -14,7 +14,7 @@ use std::{ const MAX_CHUNK_DATA_LENGTH: usize = u32::MAX as usize; -/// A builder for creating a new [Entry]. +/// A builder for creating a new [RegularEntry]. pub struct EntryBuilder { header: EntryHeader, phsf: Option, @@ -192,17 +192,12 @@ impl EntryBuilder { self } - /// Builds the entry and returns a Result containing the new [Entry]. + /// Builds the entry and returns a Result containing the new [RegularEntry]. /// /// # Returns /// - /// A Result containing the new [Entry], or an I/O error if the build fails. - #[inline] - pub fn build(self) -> io::Result { - Ok(EntryContainer::Regular(self.build_as_entry()?)) - } - - fn build_as_entry(self) -> io::Result { + /// A Result containing the new [RegularEntry], or an I/O error if the build fails. + pub fn build(self) -> io::Result { let data = if let Some(data) = self.data { data.try_into_inner()?.try_into_inner()?.inner } else {