You can use task::try(...).ok().unwrap() for Results with non-Show error
types.

Steven Fackler


On Thu, Apr 17, 2014 at 8:55 AM, Edward Wang <edward.yu.w...@gmail.com>wrote:

> It current can compile, but judging from signatures:
>
> std::task::try is pub fn try<T: Send>(f: proc(): Send -> T) -> Result<T,
> ~Any:Send>
> std::result::unwrap on the other hand is impl<T, E: Show> Result<T, E> {
> fn unwrap(self) -> T {...} }
>
> There's no way the error part of result from task::try(...) can fulfil
> Show so it shouldn't compile.
>
> Though to ask the list first before filing a bug report.
>
> Regards,
> Edward
>
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev
>
>
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to