Closed tiffany352 closed 8 years ago
I don't think you should remove the implementations of AsLua
and AsMutLua
for references. I'm surprised that the tests are passing.
I got errors because it created conflicting implementations (for &mut Lua, should it pick the &mut impl and then the Lua impl, or should it pick the &mut Lua impl?). I'm not sure how to resolve the issue otherwise, and I'm not really sure what's so bad about it.
Would this be something that would be easier to solve when specialization lands?
Ah, sorry, nevermind. I forgot that there was impl AsLua for &'a T where T: AsLua {}
.
Allows capturing the context by value instead of using a borrow, which is useful for embedding a long-living table in a struct.