<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Into-Iter on rustbites</title><link>https://www.rustbites.com/tags/into-iter/</link><description>Recent content in Into-Iter on rustbites</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 13 Jun 2026 13:03:59 +0200</lastBuildDate><atom:link href="https://www.rustbites.com/tags/into-iter/index.xml" rel="self" type="application/rss+xml"/><item><title>198. into_iter() to Transform — Move Owned Items Instead of cloned()</title><link>https://www.rustbites.com/posts/bite-198/</link><pubDate>Fri, 12 Jun 2026 17:00:00 +0100</pubDate><guid>https://www.rustbites.com/posts/bite-198/</guid><description>&lt;p&gt;You have a &lt;code&gt;Vec&lt;/code&gt; you&amp;rsquo;re about to throw away, and you want a transformed one. Reaching for &lt;code&gt;iter().cloned()&lt;/code&gt; (or &lt;code&gt;iter().map(|x| x.clone())&lt;/code&gt;) duplicates every element on the way out — but you owned them already. &lt;code&gt;into_iter()&lt;/code&gt; moves them straight through.&lt;/p&gt;</description></item></channel></rss>