<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ord on rustbites</title><link>https://www.rustbites.com/tags/ord/</link><description>Recent content in Ord on rustbites</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 03 Jun 2026 11:37:45 +0200</lastBuildDate><atom:link href="https://www.rustbites.com/tags/ord/index.xml" rel="self" type="application/rss+xml"/><item><title>178. Ord::clamp — Stop Writing min(max, max(min, x))</title><link>https://www.rustbites.com/posts/bite-178/</link><pubDate>Tue, 02 Jun 2026 17:00:00 +0100</pubDate><guid>https://www.rustbites.com/posts/bite-178/</guid><description>&lt;p&gt;Bounding a value between two limits is one of those tiny operations where everyone hand-rolls a confusing nest of &lt;code&gt;min&lt;/code&gt;/&lt;code&gt;max&lt;/code&gt; calls. &lt;code&gt;Ord::clamp&lt;/code&gt; is the single-call version, and it works on anything that&amp;rsquo;s &lt;code&gt;Ord&lt;/code&gt; or &lt;code&gt;PartialOrd&lt;/code&gt; — not just numbers.&lt;/p&gt;</description></item></channel></rss>