Skip to content

Commit

Permalink
fix: styling and failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
🎲 committed Jan 18, 2025
1 parent a535f6c commit 7bd9967
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cargo-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Lua/LuaJIT
uses: xpol/setup-lua@v0.3
with:
lua-version: '5.1.5'
lua-version: '5.1'

- name: Set Up Rust
uses: actions-rs/toolchain@v1 # Set up the Rust toolchain
Expand All @@ -33,7 +33,7 @@ jobs:
run: cargo build

- name: Test
run: lua.exe ltests/test.lua
run: lua5.1 ltests/test.lua

- name: Install Cargo Release
run: cargo install cargo-release # Install the cargo-release tool
Expand Down
6 changes: 3 additions & 3 deletions src/json_rpc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::app::AppData;
use log::{debug, info};
use mlua::prelude::{LuaFunction, LuaString};
use mlua::{Error, IntoLuaMulti, LightUserData, Lua, LuaSerdeExt, Nil, Value};
use mlua::prelude::LuaFunction;
use mlua::{Error, Lua, LuaSerdeExt, Value};
use serde::{Deserialize, Serialize};
use serde_json::Value::Null;
use tokio::sync::oneshot;
Expand Down Expand Up @@ -81,7 +81,7 @@ pub fn process_rpc(
) -> Result<JsonRpcResponse, ProcessRpcError> {
let luav = lua.to_value(&request).map_err(ProcessRpcError::LuaError)?;

let mut lua_table = luav.as_table().unwrap();
let lua_table = luav.as_table().unwrap();

// Remove the id field from the table sent to the Lua function.
if let None = &request.id {
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ pub fn lua_json_rpc(lua: &Lua) -> Result<LuaTable> {
mlua::Error::RuntimeError(format!("Error creating server: {:?}", e))
})?;

lua.create_function(move |lua: &Lua, ()| {
lua.create_function(move |_lua: &Lua, ()| {
info!("Shutting Down Server");
handle.stop(false);
drop(handle.stop(false));
Ok(())
})
})?,
Expand Down

0 comments on commit 7bd9967

Please sign in to comment.