tock / libtock-rs

Rust userland library for Tock

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Evaluate and refine conversions between `Register`, `ErrorCode`, and `ReturnVariant`.

jrvanwhy opened this issue · comments

The unit tests and system call implementations have some awkward conversions between Register and the ErrorCode and ReturnVariant types. In particular, calling assert_eq!() on the results of a system call can be very awkward, as the type inference doesn't play well with the Into and PartialEq invocations involved.

After all the system calls are implemented in libtock_unittest and libtock_platform, I will do a survey of conversions to and from Register and see if I can refine them to make the code cleaner. This issue is to remind me to do that.