Replies: 1 comment 1 reply
-
Honestly, both look fine to me, if we are using map_err everywhere then we should probably stick to that otherwise the Ok() style looks more sleek |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Which style should we use for functions that return
Result
(example frommirrord-layer/src/file/ops.rs
):The
map_err
will still be needed in some places (functions that do not returnResult
for example), but for most of the code both are valid.3 votes ·
Beta Was this translation helpful? Give feedback.
All reactions