refactor: use .display() on PathBuf

This commit is contained in:
Ryan 2025-03-11 18:51:29 -04:00
parent 6cd4394b86
commit f5e787f2df
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

View File

@ -60,7 +60,8 @@ async fn main() -> anyhow::Result<()> {
lua::register_globals(&lua, &globals, event_listeners.clone())?; lua::register_globals(&lua, &globals, event_listeners.clone())?;
globals.set("SCRIPT_PATH", &*script_path)?; globals.set("SCRIPT_PATH", &*script_path)?;
lua.load( lua.load(
read_to_string(&script_path).with_context(|| format!("failed to read {script_path:?}"))?, read_to_string(&script_path)
.with_context(|| format!("failed to read {}", script_path.display()))?,
) )
.exec()?; .exec()?;
if let Some(code) = args.exec { if let Some(code) = args.exec {