Clean up errors and fix build

This commit is contained in:
Condorra 2024-11-09 23:29:52 +11:00
parent 78e36e4dcb
commit 86c5e01b53
6 changed files with 19 additions and 14 deletions

View File

@ -13,17 +13,21 @@ use super::{load_file_contents, run_script, EditorViewDetailProps};
#[wasm_bindgen(getter_with_clone)]
struct EditorViewConfig {
#[allow(unused)]
pub doc: String,
}
#[wasm_bindgen(getter_with_clone)]
struct EditorStateConfig {
#[allow(unused)]
pub doc: String,
#[allow(unused)]
pub extensions: Vec<CMExtension>,
}
#[wasm_bindgen(getter_with_clone)]
struct HighlightingConfig {
#[allow(unused)]
pub fallback: bool,
}

View File

@ -283,14 +283,12 @@ impl LineState {
self.clear_and_render(term)?;
}
// Move to beginning
#[cfg(feature = "emacs")]
KeyCode::Char('a') => {
self.reset_cursor(term)?;
self.move_cursor(-100000)?;
self.set_cursor(term)?;
}
// Move to end
#[cfg(feature = "emacs")]
KeyCode::Char('e') => {
self.reset_cursor(term)?;
self.move_cursor(100000)?;

View File

@ -125,7 +125,7 @@ impl LuaState {
);
Ok(())
})?;
self.interp.execute(&self.exec)?;
self.interp.execute::<()>(&self.exec)?;
Ok(())
}
@ -150,7 +150,7 @@ impl LuaState {
);
Ok(())
})?;
self.interp.execute(&self.exec)?;
self.interp.execute::<()>(&self.exec)?;
Ok(())
}
}
@ -430,7 +430,7 @@ where
{
let call = seq.try_enter(|ctx, locals, _execution, mut stack| {
let obj = locals.fetch(&obj);
stack.consume(ctx)?;
stack.consume::<()>(ctx)?;
Ok(prep_metaop_call(
ctx,
stack,
@ -445,7 +445,7 @@ where
let value = stack
.pop_back()
.ok_or_else(|| anyhow::Error::msg("Index didn't return value"))?;
stack.consume(ctx)?;
stack.consume::<()>(ctx)?;
stack.push_back(locals.fetch(&obj).into_value(ctx));
for arg in arguments {
stack.push_back(locals.fetch(arg));

View File

@ -394,7 +394,7 @@ pub(super) fn frame_input<'gc>(ctx: Context<'gc>, _global_memo: &GlobalMemoCell)
let line: Value = stack
.pop_front()
.ok_or_else(|| anyhow::Error::msg("classes.frame:input missing line!"))?;
stack.consume(ctx)?;
stack.consume::<()>(ctx)?;
let aliases: UserData = frame_tab.get(ctx, "aliases")?;
let frame: Value = frame_tab.get(ctx, "frame")?;
@ -483,7 +483,7 @@ pub(super) fn frame_resize<'gc>(ctx: Context<'gc>, _global_memo: &GlobalMemoCell
let height: Value = stack
.pop_front()
.ok_or_else(|| anyhow::Error::msg("classes.frame:resize missing height!"))?;
stack.consume(ctx)?;
stack.consume::<()>(ctx)?;
frame_tab.set(ctx, "width", width)?;
frame_tab.set(ctx, "height", height)?;

View File

@ -14,15 +14,14 @@ use crate::{
id_intern::{intern_id, unintern_id},
logging::{start_deleting_logs, start_downloading_logs, start_listing_logs},
match_table::{create_match_table, match_table_add, match_table_remove},
telnet::{parse_telnet_buf, TelnetOutput, IAC},
telnet::{parse_telnet_buf, TelnetOutput},
websocket::{connect_websocket, send_message_to_mud, WebSocketId},
FrameId, GlobalLayoutCell, GlobalMemoCell,
};
use self::telopt::{
get_option_state, handle_incoming_do, handle_incoming_dont, handle_incoming_will,
handle_incoming_wont, send_subnegotiation_if_allowed, set_option_supported, MudWithMemo,
OptionState, Side, Telopt, NAWS_TELOPT,
handle_incoming_do, handle_incoming_dont, handle_incoming_will, handle_incoming_wont,
send_subnegotiation_if_allowed, set_option_supported, MudWithMemo, Side, Telopt, NAWS_TELOPT,
};
use super::{call_checking_metatable, list_match_tab, try_unwrap_frame, LuaState};

View File

@ -698,9 +698,13 @@ mod tests {
buffer: &mut FakeMudBuffer,
) {
match msg {
Some(TelnetOutput::Will(n)) => handle_incoming_will(ctx, buffer, &table, &Telopt(n)),
Some(TelnetOutput::Will(n)) => {
handle_incoming_will(ctx, buffer, &table, &Telopt(n));
}
Some(TelnetOutput::Wont(n)) => handle_incoming_wont(ctx, buffer, &table, &Telopt(n)),
Some(TelnetOutput::Do(n)) => handle_incoming_do(ctx, buffer, &table, &Telopt(n)),
Some(TelnetOutput::Do(n)) => {
handle_incoming_do(ctx, buffer, &table, &Telopt(n));
}
Some(TelnetOutput::Dont(n)) => handle_incoming_dont(ctx, buffer, &table, &Telopt(n)),
_ => {}
}