Remove serialize impl from legacy structs
This commit is contained in:
parent
20e349fd79
commit
e8bea39100
1 changed files with 1 additions and 10 deletions
11
src/cache/compat.rs
vendored
11
src/cache/compat.rs
vendored
|
@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use super::ImageContentType;
|
use super::ImageContentType;
|
||||||
|
|
||||||
#[derive(Copy, Clone, Serialize, Deserialize)]
|
#[derive(Copy, Clone, Deserialize)]
|
||||||
pub struct LegacyImageMetadata {
|
pub struct LegacyImageMetadata {
|
||||||
pub(crate) content_type: Option<LegacyImageContentType>,
|
pub(crate) content_type: Option<LegacyImageContentType>,
|
||||||
pub(crate) size: Option<u32>,
|
pub(crate) size: Option<u32>,
|
||||||
|
@ -50,15 +50,6 @@ impl<'de> Deserialize<'de> for LegacyDateTime {
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub struct LegacyImageContentType(pub ImageContentType);
|
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 {
|
impl<'de> Deserialize<'de> for LegacyImageContentType {
|
||||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||||
where
|
where
|
||||||
|
|
Loading…
Reference in a new issue