mirror of
https://github.com/rust-unofficial/patterns
synced 2024-11-12 07:10:30 +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