u/pilkytonin r/rust • Recommends
On “Should I create a reference when getting value from a Option<&SomeStruct>?”
…etime of all references in an annotated group (such as `'a`) and just uses it as a hint to figure out how long a reference is expected to live. Lifetime annotations don't CHANGE the lifetimes at all. It just helps the compiler figure out complex borrowing. His explanation doesn't teach the viewer ANY of that. Btw, there's a great video on YouTube: link to this video
- When he first attempts to explain Error Handling, he says that he's "propagating unhandled errors back to the caller", but his code example swallows the unhandled errors and just debug-prints them silently (no propagation). He actually has a chapter after that about how to propagate errors, but why did he decide to confuse the students by…