Attempt to generate just one copy of TagContentOtherFieldVisitor's field matching
This commit is contained in:
parent
bd653ab30c
commit
2fb5560746
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user