'rust rust-example-rendered'>
<span class='kw'>fn</span> <span class='ident'>to_string</span>(<span class='ident'>data</span>: <span class='kw-2'>&amp;</span><span class='ident'>u32</span>) <span class='op'>-&gt;</span> <span class='ident'>String</span> {
    <span class='macro'>format</span><span class='macro'>!</span>(<span class='string'>&quot;{}&quot;</span>, <span class='ident'>data</span>)
}</pre>

<p>We must produce an owned value inside the function to return it! The only way
we could have returned 