Simplify try-blocks in scheduler for API call replies #463
Labels
crate:scheduler
Modifies the platform
for:maintainability
Improves maintainers life
needs:implementation
Needs implementation to complete
A scheduler reply currently looks like
Result<Result<T, Error>, Trap>
which does not work nicely with try-blocks that only support one level ofResult
. This is problematic when within the same try-block some functions may returnError
while others may returnTrap
. We can only use the?
syntax forTrap
. By introducing the following type:It will be possible to use
?
for bothTrap
andError
. We also need to change the schedule reply signature to takeResult<T, Failure>
instead.This issue is part of #43.
The text was updated successfully, but these errors were encountered: