News for hackers. Stuff that matters.
Re:Announcing Rust 1.14 by stymaar on Thursday December 22, 2016 @05:57PM (#13241158)
c) a bad practice since it will make your program crash is a node has no parent.

if the node always having a parent is a invariant of your application, you should use `expect` with a clear error message when the invariant is broken.

if your node can have no parents then you want to handle this case explicitly with a `if let Some(parent) = node.parent() {` pattern.

There are no comments on this comment yet.