3 ms·
I had read that doc page but IMO it's not very clear about how you should use Result types. It's great for showing how you might want to use the question mark
by wyldfire 8y ago
I had read that doc page but IMO it's not very clear about how you should use Result types. It's great for showing how you might want to use the question mark with libstd but IMO less clear about writing your own functions and Result<> types (though apparently the most interesting constraint seems to be regarding your Result's E type).
Someone elsewhere in this thread linked to an example of `impl From<io::Error>` and IMO that's a clear, explicit example of how to do it.