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:
Yuri Astrakhan
2024-02-12 16:06:43 -05:00
parent c42ebb8839
commit b8fafefd85
3 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -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>