|
|
Borrow it or own it: your first lifetime decision
|
Easy
|
Primitives
|
|
|
|
Case-insensitive search without allocating
|
Easy
|
Primitives
|
|
|
|
collect and the turbofish: three targets, one source
|
Medium
|
Primitives
|
|
|
|
Cow: borrow until you have to own
|
Medium
|
Primitives
|
|
|
|
Cow in API design: impl Into<Cow<str>>
|
Hard
|
Framework
|
|
|
|
flat_map: expand a range spec like "1-3,7,10-12"
|
Medium
|
End-to-End
|
|
|
|
Giving ownership back
|
Medium
|
Primitives
|
|
|
|
Grouping without itertools: anagram buckets
|
Medium
|
Primitives
|
|
|
|
if is an expression
|
Easy
|
Primitives
|
|
|
|
iter, iter_mut, into_iter: all three, one Vec
|
Easy
|
Primitives
|
|
|
|
Joining owned strings
|
Easy
|
Primitives
|
|
|
|
Let elision do it
|
Easy
|
Primitives
|
|
|
|
Move or borrow: the two ways to pass a value
|
Easy
|
Primitives
|
|
|
|
Move semantics: the relay
|
Easy
|
Primitives
|
|
|
|
`?` on Option, and bridging to Result
|
Medium
|
Primitives
|
|
|
|
peekable and next_if: write a tokeniser
|
Hard
|
End-to-End
|
|
|
|
Shadowing: rebinding is not mutation
|
Easy
|
Primitives
|
|
|
|
Slices are borrows
|
Easy
|
Primitives
|
|
|
|
String and text performance, graded
|
Medium
|
End-to-End
|
|
|
|
String building: push_str, write!, and the 590x cliff
|
Easy
|
Primitives
|
|
|
|
Strings are UTF-8: bytes, chars, and the indexing panic
|
Hard
|
Primitives
|
|
|
|
String vs &str, part 2: functions that take and return text
|
Medium
|
Primitives
|
|
|
|
&str not &String, &[T] not &Vec<T> — deref coercion and ptr_arg
|
Easy
|
Primitives
|
|
|
|
take_while and skip_while: split a message at the blank line
|
Easy
|
Primitives
|
|
|
|
The three rules of ownership
|
Easy
|
Primitives
|
|
|
|
Two inputs, one output lifetime
|
Medium
|
Primitives
|
|
|
|
Zero-copy parsing: borrow, don't allocate
|
Medium
|
Primitives
|
|