marmistrz commented on Issue #1226:
We move to
std::io::Error
so as to keep the number of error types as small as possible?
kubkon commented on Issue #1226:
We move to
std::io::Error
so as to keep the number of error types as small as possible?Correct. Dan and I agreed to decouple concept of WASI errno (it's ABI representation in fact) from the functional code in
wasi-common
, and this cleanup is the first step. This will make transition towiggle
much easier in the coming days.
kubkon commented on Issue #1226:
This generally seems fine to me, I started to try to take a look at what was specifically going on but I'm pretty lost in how all these errors are handled.
In general there's a lot of rightward-drift and a lot of tests. I feel like a lot of this code could greatly benefit from not using methods-with-closures and instead have match statements with early-returns. That's sort of out of scope for this PR it looks like though.
That's fair! I agree with you that this PR isn't about this refactoring per se, but given that the proposed changes are not in that many places, I can easily refactor them here and now.
kubkon commented on Issue #1226:
This generally seems fine to me, I started to try to take a look at what was specifically going on but I'm pretty lost in how all these errors are handled.
In general there's a lot of rightward-drift and a lot of tests. I feel like a lot of this code could greatly benefit from not using methods-with-closures and instead have match statements with early-returns. That's sort of out of scope for this PR it looks like though.
@alexcrichton done in 686fd9d.
Last updated: Nov 22 2024 at 17:03 UTC