tomaka / hlua

Rust library to interface with Lua
MIT License
507 stars 48 forks source link

function can't accept nested tables #185

Closed kpcyrd closed 5 months ago

kpcyrd commented 6 years ago

given this lua code:

foo({
  abc="def",
  ghi={
    x=2
  }
})

and the following handler:

    lua.set("foo", hlua::function1(move |body: HashMap<_, _>| -> () {
        println!("body: {:?}", body);
    }))

I get this result:

body: {LuaString("abc"): LuaString("def"), LuaString("ghi"): LuaOther}

This should be LuaArray(Vec<(AnyLuaValue, AnyLuaValue)>) instead of LuaOther. What do you think?

kpcyrd commented 6 years ago

This was fixed on master, probably in #177. Please consider releasing 0.4.2! :)