rust,imperative-programming,imperative-languages
Just because both variants of Node have a value field, doesn't mean you can access it directly. You can get it by matching on the value (these are equivalent): let value = match leaf { Node::Branch { value, .. } => value, Node::Leaf { value } => value, }; let...