diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-08-10 19:06:46 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-08-10 19:06:46 +0200 |
| commit | 63cfcbe7a7745b276de58ec92e0141b958c44feb (patch) | |
| tree | 990e33a83756e27187033579ee2f85d5c79169d5 /src/state/log.rs | |
| parent | b747ca8af52129876b577a4f20f7105a05c6b002 (diff) | |
use unsafe blocks instead of mutexes
Diffstat (limited to 'src/state/log.rs')
| -rw-r--r-- | src/state/log.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state/log.rs b/src/state/log.rs index f9b4665..6c0c924 100644 --- a/src/state/log.rs +++ b/src/state/log.rs @@ -14,7 +14,7 @@ impl LogState { macro_rules! cfg { () => { - GlobalState::instance().log + GlobalState::get().log }; } @@ -22,7 +22,7 @@ impl UserData for LogState { fn add_fields<'lua, F: mlua::prelude::LuaUserDataFields<'lua, Self>>(fields: &mut F) { fields.add_field_function_get("visible", |_, _| Ok(cfg!().visible)); fields.add_field_function_set("visible", |_, _, visible: bool| { - let mut state = GlobalState::instance_mut(); + let state = GlobalState::get(); state.log.visible = visible; if let Window::Log = state.active_window { |