Why does to_result() in libtock-rs/platform/src/command_return.rs return BADRVAL for a driver check? #441
-
When performing a driver check with Console, Alarm, etc The three methods are located in For example for Console
returns and
But returns Is this expected? I would think this is indicating an error. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Agreed that is not expected. The docs for |
Beta Was this translation helpful? Give feedback.
Agreed that is not expected. The docs for
to_result()
recommend using type ascription to make the types forto_result()
explicit at the call site -- I suspect that the type forT
is being inferred incorrectly leading to the return value you see. I recommend tryinglet res: Result<(), ErrorCode> = S::command(...).to_result();