fix double convert
This commit is contained in:
parent
bf0c4f74c3
commit
082de122b1
@ -1,6 +1,6 @@
|
||||
use std::collections::{hash_map::Entry,HashMap};
|
||||
|
||||
use mlua::{FromLuaMulti,IntoLua,IntoLuaMulti};
|
||||
use mlua::{FromLua,FromLuaMulti,IntoLua,IntoLuaMulti};
|
||||
use rbx_types::Ref;
|
||||
use rbx_dom_weak::{InstanceBuilder,WeakDom};
|
||||
|
||||
@ -334,9 +334,8 @@ impl mlua::UserData for Instance{
|
||||
/// A class function definition shorthand.
|
||||
macro_rules! cf{
|
||||
($f:expr)=>{
|
||||
|lua,args|{
|
||||
//TODO: make this not suck. two fully general conversions? really?
|
||||
let (this,args):(Instance,mlua::MultiValue)=FromLuaMulti::from_lua_multi(args,lua)?;
|
||||
|lua,mut args|{
|
||||
let this=Instance::from_lua(args.pop_front().unwrap_or(mlua::Value::Nil),lua)?;
|
||||
$f(lua,this,FromLuaMulti::from_lua_multi(args,lua)?)?.into_lua_multi(lua)
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user