diff --git a/serde/src/private/de.rs b/serde/src/private/de.rs index 411525693..5e1f7ff7c 100644 --- a/serde/src/private/de.rs +++ b/serde/src/private/de.rs @@ -982,13 +982,7 @@ mod content { where E: de::Error, { - if field == self.tag { - Ok(TagContentOtherField::Tag) - } else if field == self.content { - Ok(TagContentOtherField::Content) - } else { - Ok(TagContentOtherField::Other) - } + self.visit_bytes(field.as_bytes()) } fn visit_bytes(self, field: &[u8]) -> Result