Remove serialize impl from legacy structs

master
Edward Shen 2021-07-12 13:43:47 -04:00
parent 20e349fd79
commit e8bea39100
Signed by: edward
GPG Key ID: 19182661E818369F
1 changed files with 1 additions and 10 deletions

11
src/cache/compat.rs vendored
View File

@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize};
use super::ImageContentType;
#[derive(Copy, Clone, Serialize, Deserialize)]
#[derive(Copy, Clone, Deserialize)]
pub struct LegacyImageMetadata {
pub(crate) content_type: Option<LegacyImageContentType>,
pub(crate) size: Option<u32>,
@ -50,15 +50,6 @@ impl<'de> Deserialize<'de> for LegacyDateTime {
#[derive(Copy, Clone)]
pub struct LegacyImageContentType(pub ImageContentType);
impl Serialize for LegacyImageContentType {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
{
serializer.serialize_str(self.0.as_ref())
}
}
impl<'de> Deserialize<'de> for LegacyImageContentType {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where