Skip to content

Commit

Permalink
fix: use mlua unsafe instantiation to allow using the debug library
Browse files Browse the repository at this point in the history
  • Loading branch information
oddlama committed Oct 26, 2024
1 parent f9a5fdb commit 6184fcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/script/lua.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::path::Path;
use std::result::Result::{Err as StdErr, Ok as StdOk};

use anyhow::{Context, Ok, Result};
use mlua::{self, Error as LuaError, ExternalResult, Lua, LuaOptions, StdLib};
use mlua::{self, Error as LuaError, ExternalResult, Lua};

pub struct LuaScript {
lua: Lua,
Expand All @@ -26,7 +26,7 @@ impl LuaScript {

pub fn from_raw(filename: String, code: String) -> Result<LuaScript> {
Ok(LuaScript {
lua: Lua::new_with(StdLib::DEBUG, LuaOptions::default())?,
lua: unsafe { Lua::unsafe_new() },
filename,
code,
})
Expand Down

0 comments on commit 6184fcf

Please sign in to comment.