Closed TimDiekmann closed 4 years ago
My the E
parameter? There isn’t one in std::io::Result
or std::thread::Result
. Shouldn’t users that would make it non-default be using result::Result
instead?
I don't have a strong opinion on the default parameter, but IMO they are missing in io::Result
, thread::Result
, and fmt::Result
.
Anyway, if I use a defaulted Result, I always use the module name as well for clarity:
use io;
fn foo() -> io::Result
Inspecting io::Result
again:
This typedef is generally used to avoid writing out
io::Error
directly and is otherwise a direct mapping toResult
.
Do we also want to rename alloc::AllocErr
to alloc::Error
?
There’s also alloc::LayoutErr
.
Oh, right :disappointed:
I don't feel that Result<T, AllocErr>
is sufficiently widely used to justify making a type alias.
What to you think about adding a
Result
alias to the alloc module?or even