On 04/25/2013 06:09 PM, Vadim wrote:
What if Result implemented the Drop trait and fail()'ed in drop() unless it's been "disarmed" by calling some method (get_err?) which indicates that the error has been observed?


I've had a few bits of code recently that called for this sort of pattern (similar to a promise?). I would rather come up with a different abstraction than putting this behavior into Result though.
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to