|
|
A generic Stack, and conditional impl blocks
|
Medium
|
Primitives
|
|
|
|
A macro-generated FFI binding layer
|
Hard
|
End-to-End
|
|
|
|
any, all, find, position: audit a list of records
|
Easy
|
Primitives
|
|
|
|
Arc: shared ownership across threads
|
Easy
|
Primitives
|
|
|
|
AsRef, Borrow, and signatures your callers can actually use
|
Medium
|
Primitives
|
|
|
|
Balanced ranges: the arithmetic before the threads
|
Easy
|
Primitives
|
|
|
|
bool and char
|
Easy
|
Primitives
|
|
|
|
Cancel safety, blocking, and locks across `.await`
|
Hard
|
End-to-End
|
|
|
|
Capstone: a fully-typed fallible parser
|
Hard
|
End-to-End
|
|
|
|
Case-insensitive search without allocating
|
Easy
|
Primitives
|
|
|
|
Countdown futures and the shape of `Pending`
|
Easy
|
Primitives
|
|
|
|
Cow: borrow until you have to own
|
Medium
|
Primitives
|
|
|
|
C strings, ownership across the boundary, and FFI-safe types
|
Medium
|
Framework
|
|
|
|
Default, #[default] on an enum variant, and ..Default::default()
|
Easy
|
Primitives
|
|
|
|
Deref and the coercion you have been using all along
|
Medium
|
Primitives
|
|
|
|
Deriving traits, and when derive gets the bounds wrong
|
Easy
|
Primitives
|
|
|
|
Designing safe wrappers around unsafe FFI
|
Hard
|
End-to-End
|
|
|
|
Designing signatures: T, &T, &mut T, impl Into<T>
|
Medium
|
Primitives
|
|
|
|
Display, Debug, and the ToString blanket impl
|
Easy
|
Primitives
|
|
|
|
Documenting failure: # Errors and # Panics
|
Medium
|
Framework
|
|
|
|
Eager vs lazy defaults
|
Easy
|
Primitives
|
|
|
|
fold and try_fold: a total that refuses to overflow
|
Medium
|
Primitives
|
|
|
|
From, Into, and your first blanket impl with teeth
|
Medium
|
Primitives
|
|
|
|
Generics, traits and lifetimes in one signature
|
Medium
|
Primitives
|
|
|
|
Hash and the Hash/Eq contract
|
Medium
|
Primitives
|
|
|
|
if let, while let, and let ... else
|
Easy
|
Primitives
|
|
|
|
Implement Iterator by hand: the Collatz sequence
|
Medium
|
Primitives
|
|
|
|
Indexing in a loop is usually a borrow-checker workaround — and clippy knows
|
Medium
|
Primitives
|
|
|
|
`large_enum_variant`: boxing the fat variant
|
Medium
|
Primitives
|
|
|
|
Laziness: prove the pipeline interleaves
|
Easy
|
Primitives
|
|
|
|
Let elision do it
|
Easy
|
Primitives
|
|
|
|
`let _ =` versus `let _x =`: the guard that dies instantly
|
Medium
|
Primitives
|
|
|
|
loop, while, for, and break with a value
|
Easy
|
Primitives
|
|
|
|
Make the lint happy: `'_` in return paths
|
Easy
|
Primitives
|
|
|
|
map, filter, filter_map: parse host:port lines
|
Easy
|
Primitives
|
|
|
|
matches! and the lints that push you toward it
|
Easy
|
Primitives
|
|
|
|
Method receivers and the consuming builder
|
Medium
|
Primitives
|
|
|
|
#[must_use] in depth
|
Medium
|
Framework
|
|
|
|
One file, one function, one gate
|
Easy
|
Primitives
|
|
|
|
PartialOrd and Ord: derived ordering follows declaration order
|
Medium
|
Primitives
|
|
|
|
Pointer arithmetic: `offset`, `add`, `sub`, `wrapping_*`
|
Medium
|
Primitives
|
|
|
|
`poll_fn`: a future from a closure
|
Easy
|
Primitives
|
|
|
|
Propagating with `?`
|
Easy
|
Primitives
|
|
|
|
`ptr::read`, `write`, `copy`, `copy_nonoverlapping`, `drop_in_place`
|
Medium
|
Primitives
|
|
|
|
Ranges: .., ..=, and range patterns
|
Easy
|
Primitives
|
|
|
|
`Rc<RefCell<T>>`: the workhorse, and when it is a smell
|
Hard
|
End-to-End
|
|
|
|
`Rc<str>`: interning without double indirection
|
Medium
|
Primitives
|
|
|
|
Result, and why it is #[must_use]
|
Easy
|
Primitives
|
|
|
|
Result combinators and map_err
|
Easy
|
Primitives
|
|
|
|
Safety comments as a discipline: `// SAFETY:` and `# Safety`
|
Easy
|
Primitives
|
|