From 649220e3bacf3f8faf486de64f5bb67fb11510f0 Mon Sep 17 00:00:00 2001 From: Micah Date: Wed, 18 Dec 2024 15:58:05 -0800 Subject: [PATCH] Make it actually compile (rust-analyzer failed me) --- crates/lune-std-roblox/src/lib.rs | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/crates/lune-std-roblox/src/lib.rs b/crates/lune-std-roblox/src/lib.rs index b71bbb7..ec574b7 100644 --- a/crates/lune-std-roblox/src/lib.rs +++ b/crates/lune-std-roblox/src/lib.rs @@ -1,7 +1,5 @@ #![allow(clippy::cargo_common_metadata)] -use std::path::PathBuf; - use mlua::prelude::*; use mlua_luau_scheduler::LuaSpawnExt; use once_cell::sync::OnceCell; @@ -155,30 +153,26 @@ fn implement_method( Ok(()) } -fn studio_application_path(_: &Lua, _: ()) -> LuaResult { +fn studio_application_path(_: &Lua, _: ()) -> LuaResult { RobloxStudio::locate() - .map(RobloxStudio::application_path) - .map(ToOwned::to_owned) + .map(|rs| rs.application_path().display().to_string()) .map_err(LuaError::external) } -fn studio_content_path(_: &Lua, _: ()) -> LuaResult { +fn studio_content_path(_: &Lua, _: ()) -> LuaResult { RobloxStudio::locate() - .map(RobloxStudio::content_path) - .map(ToOwned::to_owned) + .map(|rs| rs.content_path().display().to_string()) .map_err(LuaError::external) } -fn studio_plugin_path(_: &Lua, _: ()) -> LuaResult { +fn studio_plugin_path(_: &Lua, _: ()) -> LuaResult { RobloxStudio::locate() - .map(RobloxStudio::plugins_path) - .map(ToOwned::to_owned) + .map(|rs| rs.plugins_path().display().to_string()) .map_err(LuaError::external) } -fn studio_builtin_plugin_path(_: &Lua, _: ()) -> LuaResult { +fn studio_builtin_plugin_path(_: &Lua, _: ()) -> LuaResult { RobloxStudio::locate() - .map(RobloxStudio::built_in_plugins_path) - .map(ToOwned::to_owned) + .map(|rs| rs.built_in_plugins_path().display().to_string()) .map_err(LuaError::external) }