<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Fmt on rustbites</title><link>https://www.rustbites.com/tags/fmt/</link><description>Recent content in Fmt on rustbites</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 08 Jun 2026 11:56:48 +0200</lastBuildDate><atom:link href="https://www.rustbites.com/tags/fmt/index.xml" rel="self" type="application/rss+xml"/><item><title>187. fmt::Write — Stop Allocating a Temp String Just to Append It</title><link>https://www.rustbites.com/posts/bite-187/</link><pubDate>Sun, 07 Jun 2026 09:00:00 +0100</pubDate><guid>https://www.rustbites.com/posts/bite-187/</guid><description>&lt;p&gt;&lt;code&gt;out.push_str(&amp;amp;format!(&amp;quot;{name}: {score}&amp;quot;))&lt;/code&gt; builds a brand-new &lt;code&gt;String&lt;/code&gt;, copies it into &lt;code&gt;out&lt;/code&gt;, then throws it away — every single iteration. One &lt;code&gt;use std::fmt::Write;&lt;/code&gt; and &lt;code&gt;write!&lt;/code&gt; formats straight into your buffer instead.&lt;/p&gt;</description></item></channel></rss>