Simplify serialize impl for String

This commit is contained in:
David Tolnay 2017-04-13 15:34:20 -07:00
parent 7dd01dd54a
commit bdccde5c9b
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -55,7 +55,7 @@ impl Serialize for String {
where
S: Serializer,
{
(&self[..]).serialize(serializer)
serializer.serialize_str(self)
}
}