mirror of
https://github.com/lune-org/lune.git
synced 2025-04-07 20:10:55 +01:00
Make it actually compile (rust-analyzer failed me)
This commit is contained in:
parent
d379dfa7ee
commit
649220e3ba
1 changed files with 8 additions and 14 deletions
|
@ -1,7 +1,5 @@
|
||||||
#![allow(clippy::cargo_common_metadata)]
|
#![allow(clippy::cargo_common_metadata)]
|
||||||
|
|
||||||
use std::path::PathBuf;
|
|
||||||
|
|
||||||
use mlua::prelude::*;
|
use mlua::prelude::*;
|
||||||
use mlua_luau_scheduler::LuaSpawnExt;
|
use mlua_luau_scheduler::LuaSpawnExt;
|
||||||
use once_cell::sync::OnceCell;
|
use once_cell::sync::OnceCell;
|
||||||
|
@ -155,30 +153,26 @@ fn implement_method(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn studio_application_path(_: &Lua, _: ()) -> LuaResult<PathBuf> {
|
fn studio_application_path(_: &Lua, _: ()) -> LuaResult<String> {
|
||||||
RobloxStudio::locate()
|
RobloxStudio::locate()
|
||||||
.map(RobloxStudio::application_path)
|
.map(|rs| rs.application_path().display().to_string())
|
||||||
.map(ToOwned::to_owned)
|
|
||||||
.map_err(LuaError::external)
|
.map_err(LuaError::external)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn studio_content_path(_: &Lua, _: ()) -> LuaResult<PathBuf> {
|
fn studio_content_path(_: &Lua, _: ()) -> LuaResult<String> {
|
||||||
RobloxStudio::locate()
|
RobloxStudio::locate()
|
||||||
.map(RobloxStudio::content_path)
|
.map(|rs| rs.content_path().display().to_string())
|
||||||
.map(ToOwned::to_owned)
|
|
||||||
.map_err(LuaError::external)
|
.map_err(LuaError::external)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn studio_plugin_path(_: &Lua, _: ()) -> LuaResult<PathBuf> {
|
fn studio_plugin_path(_: &Lua, _: ()) -> LuaResult<String> {
|
||||||
RobloxStudio::locate()
|
RobloxStudio::locate()
|
||||||
.map(RobloxStudio::plugins_path)
|
.map(|rs| rs.plugins_path().display().to_string())
|
||||||
.map(ToOwned::to_owned)
|
|
||||||
.map_err(LuaError::external)
|
.map_err(LuaError::external)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn studio_builtin_plugin_path(_: &Lua, _: ()) -> LuaResult<PathBuf> {
|
fn studio_builtin_plugin_path(_: &Lua, _: ()) -> LuaResult<String> {
|
||||||
RobloxStudio::locate()
|
RobloxStudio::locate()
|
||||||
.map(RobloxStudio::built_in_plugins_path)
|
.map(|rs| rs.built_in_plugins_path().display().to_string())
|
||||||
.map(ToOwned::to_owned)
|
|
||||||
.map_err(LuaError::external)
|
.map_err(LuaError::external)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue