Skip to content

Commit

Permalink
docs: rust iterrators
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan4yin committed Sep 17, 2024
1 parent a220161 commit ae69af1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pl/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
型:`fn returns_summarizable(arg: impl Xxx) -> impl Summary {...}`
- Trait 对象(Trait Object):`Box<dyn Xxx>`,还没学,不是很懂...

### 迭代器

- Rust 的迭代器是零开销抽象,性能甚至比 loop 循环还稍微好一点,代码也比循环更简洁易懂,强烈建议使用。

### 智能指针与并发安全

跟 C 语言一样,rust 默认在栈上分配空间,即使使用 reference 引用,也是一样的。
Expand Down

0 comments on commit ae69af1

Please sign in to comment.