mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-13 14:51:01 +00:00
Attempt to generate just one copy of TagContentOtherFieldVisitor's field matching
This commit is contained in:
@@ -982,13 +982,7 @@ mod content {
|
|||||||
where
|
where
|
||||||
E: de::Error,
|
E: de::Error,
|
||||||
{
|
{
|
||||||
if field == self.tag {
|
self.visit_bytes(field.as_bytes())
|
||||||
Ok(TagContentOtherField::Tag)
|
|
||||||
} else if field == self.content {
|
|
||||||
Ok(TagContentOtherField::Content)
|
|
||||||
} else {
|
|
||||||
Ok(TagContentOtherField::Other)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn visit_bytes<E>(self, field: &[u8]) -> Result<Self::Value, E>
|
fn visit_bytes<E>(self, field: &[u8]) -> Result<Self::Value, E>
|
||||||
|
|||||||
Reference in New Issue
Block a user