Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LuaArray should be Vec<(AnyHashableLuaValue, AnyLuaValue)> #186

Open
kpcyrd opened this issue Mar 26, 2018 · 1 comment · May be fixed by #196
Open

LuaArray should be Vec<(AnyHashableLuaValue, AnyLuaValue)> #186

kpcyrd opened this issue Mar 26, 2018 · 1 comment · May be fixed by #196

Comments

@kpcyrd
Copy link
Contributor

kpcyrd commented Mar 26, 2018

I'm having trouble converting from HashMap<AnyHashableLuaValue, AnyLuaValue> to AnyLuaValue::LuaArray due to this. Since the first element is the key, I think AnyHashableLuaValue is the correct way to go here.

Thanks!

@tpdickso
Copy link

This wouldn't be correct, as lua tables can have floating-point keys, which are not hashable, so it would be incorrect to disallow AnyLuaValue from representing this. The correct solution, I think, would be to have impl From<AnyHashableLuaValue> for AnyLuaValue.

tpdickso pushed a commit to tpdickso/hlua that referenced this issue Jul 31, 2018
@tpdickso tpdickso linked a pull request Jul 31, 2018 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants