<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>2.11 示例说明 on 编程那些事儿</title><link>https://before80.github.io/prgms/Rust/rustLearning/borrow-errors/illustrative-examples/</link><description>Recent content in 2.11 示例说明 on 编程那些事儿</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Sun, 23 Aug 2026 21:05:58 +0800</lastBuildDate><atom:link href="https://before80.github.io/prgms/Rust/rustLearning/borrow-errors/illustrative-examples/index.xml" rel="self" type="application/rss+xml"/><item><title>2.11.1 可变切片迭代器</title><link>https://before80.github.io/prgms/Rust/rustLearning/borrow-errors/illustrative-examples/2.11.1-mutable-slice-iterator/</link><pubDate>Sun, 23 Aug 2026 10:16:00 +0800</pubDate><guid>https://before80.github.io/prgms/Rust/rustLearning/borrow-errors/illustrative-examples/2.11.1-mutable-slice-iterator/</guid><description>&lt;blockquote&gt;
&lt;p&gt;译文 · 基于 &lt;a href="https://quinedot.github.io/rust-learning/"&gt;Learning Rust&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1 id="mutable-slice-iterator"&gt;可变切片迭代器&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href="https://quinedot.github.io/rust-learning/lt-ex-mut-slice.html"&gt;https://quinedot.github.io/rust-learning/lt-ex-mut-slice.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;标准库有&lt;a href="https://doc.rust-lang.org/std/slice/struct.IterMut.html"&gt;一个遍历 &lt;code&gt;&amp;amp;mut [T]&lt;/code&gt; 的迭代器&lt;/a&gt;，（在撰写本文时）通过指针算术实现，大概是为了优化。在本例中，我们将展示如何用完全安全的代码实现自己的可变切片迭代器。&lt;/p&gt;</description></item></channel></rss>