Replace ok_or and map_err with context or with_context.
Replaced return Err(Error::Xxx) with return XxxSnafu.fail().
Created consistent Result<T, E = Error> type-aliases, and moved them to below the imports section. (Replaced Result<T> type-aliases which enforced the error type).
Definition of Done Checklist
Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
Please make sure all these things are done and tick the boxes
Description
:rotating_light: Breaking
thiserror
and move all errors to module-scoped error enumsok_or
andmap_err
withcontext
orwith_context
.return Err(Error::Xxx)
withreturn XxxSnafu.fail()
.Result<T, E = Error>
type-aliases, and moved them to below the imports section. (ReplacedResult<T>
type-aliases which enforced the error type).Definition of Done Checklist