From 721d9e170696060f2d6ab808815cd6ab8de5c896 Mon Sep 17 00:00:00 2001 From: asonix Date: Wed, 30 Aug 2023 20:55:38 -0500 Subject: [PATCH] Don't try parsing an internal format for OldDetails --- src/repo_04/sled.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/repo_04/sled.rs b/src/repo_04/sled.rs index 594a994..299f4e5 100644 --- a/src/repo_04/sled.rs +++ b/src/repo_04/sled.rs @@ -80,8 +80,6 @@ pub(crate) struct OldDetails { frames: Option, content_type: crate::serde_str::Serde, created_at: MaybeHumanDate, - #[serde(skip_serializing_if = "Option::is_none")] - format: Option, } impl OldDetails { @@ -92,15 +90,12 @@ impl OldDetails { frames, content_type, created_at, - format, } = self; - let format = format.or_else(|| { - crate::formats::InternalFormat::maybe_from_media_type( - &content_type, - self.frames.is_some(), - ) - })?; + let format = crate::formats::InternalFormat::maybe_from_media_type( + &content_type, + self.frames.is_some(), + )?; Some(Details::from_parts_full( format,