Currently, the impl Push for Result<T, E> will push the T if the result is Ok, or raise a Lua error if it is an Err.
I would have expected it to return a nil, <message> tuple instead, since that is the preferred way of passing errors back to Lua code and thus makes it easy to build idiomatic APIs.
Currently, the
impl Push for Result<T, E>
will push theT
if the result isOk
, or raise a Lua error if it is anErr
.I would have expected it to return a
nil, <message>
tuple instead, since that is the preferred way of passing errors back to Lua code and thus makes it easy to build idiomatic APIs.