mirror of
https://github.com/DioxusLabs/dioxus
synced 2025-02-17 06:08:26 +00:00
fix: un-wrap Result
for init_plugin_dir
This commit is contained in:
parent
3b1eec2ed2
commit
719015378b
1 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ impl PluginManager {
|
|||
let manager = lua.create_table().unwrap();
|
||||
let name_index = lua.create_table().unwrap();
|
||||
|
||||
let plugin_dir = Self::init_plugin_dir().unwrap();
|
||||
let plugin_dir = Self::init_plugin_dir();
|
||||
|
||||
let api = lua.create_table().unwrap();
|
||||
|
||||
|
@ -288,7 +288,7 @@ impl PluginManager {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn init_plugin_dir() -> anyhow::Result<PathBuf> {
|
||||
pub fn init_plugin_dir() -> PathBuf {
|
||||
let app_path = app_path();
|
||||
let plugin_path = app_path.join("plugins");
|
||||
if !plugin_path.is_dir() {
|
||||
|
@ -298,7 +298,7 @@ impl PluginManager {
|
|||
log::error!("Failed to init plugin dir, error caused by {}. ", err);
|
||||
}
|
||||
}
|
||||
Ok(plugin_path)
|
||||
plugin_path
|
||||
}
|
||||
|
||||
pub fn plugin_list() -> Vec<String> {
|
||||
|
|
Loading…
Add table
Reference in a new issue