mirror of
https://github.com/rust-unofficial/patterns
synced 2024-11-14 18:12:46 +00:00
2.5 KiB
2.5 KiB
Summary
-
- Use borrowed types for arguments
- Concatenating Strings with
format!
- Constructor
- The
Default
Trait - Collections Are Smart Pointers
- Finalisation in Destructors
mem::{take(_), replace(_)}
- On-Stack Dynamic Dispatch
- Foreign function interface (FFI)
- Iterating over an
Option
- Pass Variables to Closure
- Privacy For Extensibility
- Easy doc initialization
- Temporary mutability