<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Collect on rustbites</title><link>https://www.rustbites.com/tags/collect/</link><description>Recent content in Collect on rustbites</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 29 May 2026 09:16:03 +0200</lastBuildDate><atom:link href="https://www.rustbites.com/tags/collect/index.xml" rel="self" type="application/rss+xml"/><item><title>168. collect::&lt;Result&lt;Vec&lt;_&gt;, _&gt;&gt;() — Bail an Iterator on the First Error</title><link>https://www.rustbites.com/posts/bite-168/</link><pubDate>Thu, 28 May 2026 17:00:00 +0100</pubDate><guid>https://www.rustbites.com/posts/bite-168/</guid><description>&lt;p&gt;You have a &lt;code&gt;Vec&amp;lt;&amp;amp;str&amp;gt;&lt;/code&gt; of numbers to parse and you want to bail the moment one of them is malformed. The hand-rolled loop with &lt;code&gt;?&lt;/code&gt; works, but &lt;code&gt;collect()&lt;/code&gt; does the same thing in one line — and most people never realize the trick is in the turbofish.&lt;/p&gt;</description></item></channel></rss>