Skip to content

Commit

Permalink
chore(gadget-blueprint-serde): defer enum variant deserializing
Browse files Browse the repository at this point in the history
  • Loading branch information
Serial-ATA committed Nov 4, 2024
1 parent 46a3a4c commit 4dbc5ca
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions blueprint-serde/src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use alloc::boxed::Box;
use alloc::format;
use alloc::string::String;
use alloc::vec::Vec;
use core::fmt::Display;
use serde::ser;
use serde::Serialize;
use tangle_subxt::subxt_core::utils::AccountId32;
Expand Down Expand Up @@ -165,7 +164,7 @@ impl<'a> serde::Serializer for &'a mut Serializer {
_variant: &'static str,
_len: usize,
) -> Result<Self::SerializeTupleVariant> {
Err(Self::Error::UnsupportedType(UnsupportedType::NonUnitEnum))
Ok(self)
}

fn serialize_map(self, _len: Option<usize>) -> Result<Self::SerializeMap> {
Expand All @@ -188,14 +187,7 @@ impl<'a> serde::Serializer for &'a mut Serializer {
_variant: &'static str,
_len: usize,
) -> Result<Self::SerializeStructVariant> {
Err(Self::Error::UnsupportedType(UnsupportedType::NonUnitEnum))
}

fn collect_str<T>(self, _value: &T) -> Result<Self::Ok>
where
T: ?Sized + Display,
{
todo!()
Ok(self)
}

fn is_human_readable(&self) -> bool {
Expand Down

0 comments on commit 4dbc5ca

Please sign in to comment.