miniblog.
← Back to all posts
Wilfred Hughes
Oct 2, 2016 at 04:20
Rust 1.12 now supports coercing values of type T to type Option<T>!
https://github.com/rust-lang/rust/pull/34828
Introduces some interesting API possibilities.
core: impl From<T> for Option<T> by seanmonstar · Pull Request #34828 · rust-lang/rust
First, the semantics of this impl seem spot on. If I have a value T, and I wish to make a Option&lt;T&gt;, then Option::from(val) should always give Some(val). Second, this allows improvement for s...