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 committed 2024-02-12 16:12:08 -05:00
1 parent c42ebb8839
commit b8fafefd85
3 files changed
+16 -16

No files matched your search

+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>