mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 16:08:05 +00:00
A few minor write_str optimizations and inlining
Apparently `write!` generates more code than `write_str` when used with a simple string, so optimizing it.
This commit is contained in:
@@ -63,7 +63,7 @@ fn test_map_access_to_enum() {
|
||||
type Value = Potential;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(formatter, "a map")
|
||||
formatter.write_str("a map")
|
||||
}
|
||||
|
||||
fn visit_map<A>(self, map: A) -> Result<Self::Value, A::Error>
|
||||
|
||||
Reference in New Issue
Block a user