mirror of
https://github.com/bspeice/speice.io
synced 2024-12-22 16:48:10 -05:00
RefCell is OK too.
This commit is contained in:
parent
fa5bf2d713
commit
03f72cff8e
@ -518,8 +518,9 @@ guidelines are in order:
|
|||||||
[`HashMap`](https://doc.rust-lang.org/stable/std/collections/struct.HashMap.html)
|
[`HashMap`](https://doc.rust-lang.org/stable/std/collections/struct.HashMap.html)
|
||||||
- Enums and other wrapper types will not trigger heap allocations unless
|
- Enums and other wrapper types will not trigger heap allocations unless
|
||||||
the underlying type also needs heap allocation. You can use
|
the underlying type also needs heap allocation. You can use
|
||||||
[`Option`](https://doc.rust-lang.org/stable/core/option/enum.Option.html) and
|
[`Option`](https://doc.rust-lang.org/stable/core/option/enum.Option.html),
|
||||||
[`Result`](https://doc.rust-lang.org/stable/core/result/enum.Result.html)
|
[`Result`](https://doc.rust-lang.org/stable/core/result/enum.Result.html), and
|
||||||
|
[`RefCell`](https://doc.rust-lang.org/stable/core/cell/struct.RefCell.html)
|
||||||
with reckless abandon.
|
with reckless abandon.
|
||||||
- [Arrays](https://doc.rust-lang.org/std/primitive.array.html) are guaranteed
|
- [Arrays](https://doc.rust-lang.org/std/primitive.array.html) are guaranteed
|
||||||
to be stack-allocated in all circumstances.
|
to be stack-allocated in all circumstances.
|
||||||
|
Loading…
Reference in New Issue
Block a user