top | item 34701736

(no title)

ramranch | 3 years ago

I am a fan of Rust, but I feel obligated to point out the return type of the current function does not provide any guarantees about the type which '?' was used on, even on stable. Since the generic requirement to use '?' with a return type of `Result<T,E>` is just `Into<E>`, you would still need to look at the called function since `From<E> for T` could be satisfied for (almost) any T.

discuss

order

swsieber|3 years ago

Ah, I did not realize that. Thanks for pointing that out!