Skip to content

Commit

Permalink
refactor(cli): Satiate clippy's new "never type fallback" lint
Browse files Browse the repository at this point in the history
New in Rust 1.81.0, scheduled to be an error in edition 2024:

rust-lang/rust#123748

It looks like mlua v0.10 won't need this workaround:

mlua-rs/mlua@3641c98
  • Loading branch information
alerque committed Sep 5, 2024
1 parent ffda4a8 commit d9b7b01
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ pub fn run(
local spec = SILE.parserBits.cliuse:match($module);
table.insert(SILE.input.uses, spec)
})
.eval()?;
.eval::<()>()?;
// let spec = cliuse.call_function::<_, _, _>("match", module);
}
}
if !quiet {
eprintln!("{full_version}");
}
let init: LuaFunction = sile.get("init")?;
init.call::<_, _>(())?;
init.call::<_, ()>(())?;
if let Some(inputs) = inputs {
let input_filenames: LuaTable = lua.create_table()?;
for input in inputs.iter() {
Expand All @@ -175,20 +175,20 @@ pub fn run(
let spec = spec?;
let module: LuaString = spec.get("module")?;
let options: LuaTable = spec.get("options")?;
r#use.call::<(LuaString, LuaTable), _>((module, options))?;
r#use.call::<(LuaString, LuaTable), ()>((module, options))?;
}
let input_filenames: LuaTable = sile_input.get("filenames")?;
let process_file: LuaFunction = sile.get("processFile")?;
for file in input_filenames.sequence_values::<LuaString>() {
process_file.call::<LuaString, ()>(file?)?;
}
let finish: LuaFunction = sile.get("finish")?;
finish.call::<_, _>(())?;
finish.call::<_, ()>(())?;
} else {
let repl_module: LuaString = lua.create_string("core.repl")?;
let require: LuaFunction = lua.globals().get("require")?;
let repl: LuaTable = require.call::<LuaString, LuaTable>(repl_module)?;
repl.call_method::<_, _>("enter", ())?;
repl.call_method::<_, ()>("enter", ())?;
}
Ok(())
}
Expand Down

0 comments on commit d9b7b01

Please sign in to comment.