| ▲ | brohee 7 hours ago | ||||||||||||||||||||||||||||
The very useful TryFrom trait landed only in 1.34, so hopefully the code using unwrap_or_else() in From impl predates that... Actually the From trait documentation is now extremely clear about when to implement it (https://doc.rust-lang.org/std/convert/trait.From.html#when-t...) | |||||||||||||||||||||||||||||
| ▲ | rolandog 7 hours ago | parent [-] | ||||||||||||||||||||||||||||
As someone unfamiliar with Rust (yet! it's on my ever growing list of things I'd like to absorb into my brain), unwrap_or_else() sounds like part of the "What You See Is What I Threatened the Computer To Do" paradigm. | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||