Skip to content

Commit

Permalink
Change MapKeySerializer::serialize_some to fall through instead of er…
Browse files Browse the repository at this point in the history
…roring
  • Loading branch information
LPGhatguy committed Jun 21, 2023
1 parent a0ddb25 commit b0fa978
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1043,11 +1043,12 @@ where
Err(key_must_be_a_string())
}

fn serialize_some<T>(self, _value: &T) -> Result<()>
#[inline]
fn serialize_some<T>(self, value: &T) -> Result<()>
where
T: ?Sized + Serialize,
{
Err(key_must_be_a_string())
value.serialize(self)
}

fn serialize_seq(self, _len: Option<usize>) -> Result<Self::SerializeSeq> {
Expand Down

0 comments on commit b0fa978

Please sign in to comment.