From 34a44be3ff591625f171fc9c835a2b8bc1f5af63 Mon Sep 17 00:00:00 2001 From: AsynchronousMatrix Date: Thu, 10 Aug 2023 14:56:43 +0100 Subject: [PATCH] feature: add support for 'LuaValue::Number' type --- src/lune/builtins/luau.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lune/builtins/luau.rs b/src/lune/builtins/luau.rs index fdfa62a..56aa734 100644 --- a/src/lune/builtins/luau.rs +++ b/src/lune/builtins/luau.rs @@ -21,16 +21,19 @@ fn compile_source<'lua>( if let Some(options) = options { optimization_level = match options.raw_get("optimizationLevel")? { LuaValue::Integer(val) => val as u8, + LuaValue::Number(val) => val as u8, _ => optimization_level, }; coverage_level = match options.raw_get("coverageLevel")? { LuaValue::Integer(val) => val as u8, + LuaValue::Number(val) => val as u8, _ => coverage_level, }; debug_level = match options.raw_get("debugLevel")? { LuaValue::Integer(val) => val as u8, + LuaValue::Number(val) => val as u8, _ => debug_level, }; };