@@ -111,10 +111,7 @@ impl FromLua for LuaScriptValue {
111111 Value :: Nil => ScriptValue :: Unit ,
112112 Value :: Boolean ( b) => ScriptValue :: Bool ( b) ,
113113 // Value::LightUserData(light_user_data) => todo!(),
114- #[ cfg( not( feature = "luau" ) ) ]
115114 Value :: Integer ( i) => ScriptValue :: Integer ( i) ,
116- #[ cfg( feature = "luau" ) ]
117- Value :: Integer ( i) => ScriptValue :: Integer ( i as i64 ) ,
118115 Value :: Number ( n) => ScriptValue :: Float ( n) ,
119116 Value :: String ( s) => ScriptValue :: String ( s. to_str ( ) ?. to_owned ( ) . into ( ) ) ,
120117 Value :: Function ( f) => ScriptValue :: Function (
@@ -187,10 +184,7 @@ impl IntoLua for LuaScriptValue {
187184 Ok ( match self . 0 {
188185 ScriptValue :: Unit => Value :: Nil ,
189186 ScriptValue :: Bool ( b) => Value :: Boolean ( b) ,
190- #[ cfg( not( feature = "luau" ) ) ]
191187 ScriptValue :: Integer ( i) => Value :: Integer ( i) ,
192- #[ cfg( feature = "luau" ) ]
193- ScriptValue :: Integer ( i) => Value :: Integer ( i as i32 ) ,
194188 ScriptValue :: Float ( f) => Value :: Number ( f) ,
195189 ScriptValue :: String ( s) => Value :: String ( lua. create_string ( s. as_ref ( ) ) ?) ,
196190 ScriptValue :: Reference ( r) => LuaReflectReference :: from ( r) . into_lua ( lua) ?,
@@ -199,8 +193,8 @@ impl IntoLua for LuaScriptValue {
199193 . create_function ( move |lua, args : MultiLuaScriptValue | {
200194 let loc = {
201195 profiling:: scope!( "function call context" ) ;
202- lua. inspect_stack ( 1 ) . map ( |debug| LocationContext {
203- line : debug. curr_line ( ) . try_into ( ) . unwrap_or_default ( ) ,
196+ lua. inspect_stack ( 1 , |debug| LocationContext {
197+ line : debug. current_line ( ) . unwrap_or_default ( ) as u32 ,
204198 col : None ,
205199 script_name : lua. app_data_ref :: < LuaContextAppData > ( ) . and_then ( |v| {
206200 v. last_loaded_script_name . as_ref ( ) . map ( |n| n. to_string ( ) )
@@ -221,8 +215,8 @@ impl IntoLua for LuaScriptValue {
221215 . create_function ( move |lua, args : MultiLuaScriptValue | {
222216 let loc = {
223217 profiling:: scope!( "function call context" ) ;
224- lua. inspect_stack ( 1 ) . map ( |debug| LocationContext {
225- line : debug. curr_line ( ) . try_into ( ) . unwrap_or_default ( ) ,
218+ lua. inspect_stack ( 1 , |debug| LocationContext {
219+ line : debug. current_line ( ) . unwrap_or_default ( ) as u32 ,
226220 col : None ,
227221 script_name : lua. app_data_ref :: < LuaContextAppData > ( ) . and_then ( |v| {
228222 v. last_loaded_script_name . as_ref ( ) . map ( |n| n. to_string ( ) )
0 commit comments