diff --git a/src/icf/mod.rs b/src/icf/mod.rs index 6d68518..d0fffbb 100644 --- a/src/icf/mod.rs +++ b/src/icf/mod.rs @@ -270,16 +270,7 @@ pub fn serialize_icf(data: &[IcfData]) -> Result> { let mut app_id: Option = None; for container in data { - // I don't think there's a really good way to do this? - // At least, not without breaking backwards compatibility. - let is_prerelease = match container { - IcfData::System(s) => s.is_prerelease, - IcfData::App(a) => a.is_prerelease, - IcfData::Option(o) => o.is_prerelease, - IcfData::Patch(p) => p.is_prerelease, - }; - - if is_prerelease { + if container.is_prerelease() { icf.extend([0x01, 0x02, 0x00, 0x00]); } else { icf.extend([0x02, 0x01, 0x00, 0x00]);