<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Panics on rustbites</title><link>https://www.rustbites.com/tags/panics/</link><description>Recent content in Panics on rustbites</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 30 Apr 2026 19:58:08 +0200</lastBuildDate><atom:link href="https://www.rustbites.com/tags/panics/index.xml" rel="self" type="application/rss+xml"/><item><title>110. slice::split_at_checked — Split Without the Panic</title><link>https://www.rustbites.com/posts/bite-110/</link><pubDate>Thu, 30 Apr 2026 09:00:00 +0100</pubDate><guid>https://www.rustbites.com/posts/bite-110/</guid><description>&lt;p&gt;&lt;code&gt;slice.split_at(i)&lt;/code&gt; panics the second &lt;code&gt;i &amp;gt; len&lt;/code&gt;. The usual fix is a length check wrapped around the call so you don&amp;rsquo;t blow up on a bad index. &lt;code&gt;split_at_checked&lt;/code&gt; does the same job in one call and hands you an &lt;code&gt;Option&lt;/code&gt;.&lt;/p&gt;</description></item></channel></rss>