mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
fix: return correct type in get_profiles function
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
use super::CmdResult;
|
use super::CmdResult;
|
||||||
use super::StringifyErr;
|
use super::StringifyErr;
|
||||||
use crate::utils::draft::SharedBox;
|
|
||||||
use crate::{
|
use crate::{
|
||||||
config::{
|
config::{
|
||||||
Config, IProfiles, PrfItem, PrfOption,
|
Config, IProfiles, PrfItem, PrfOption,
|
||||||
@@ -24,10 +23,10 @@ use std::time::Duration;
|
|||||||
static CURRENT_SWITCHING_PROFILE: AtomicBool = AtomicBool::new(false);
|
static CURRENT_SWITCHING_PROFILE: AtomicBool = AtomicBool::new(false);
|
||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub async fn get_profiles() -> CmdResult<SharedBox<IProfiles>> {
|
pub async fn get_profiles() -> CmdResult<IProfiles> {
|
||||||
logging!(debug, Type::Cmd, "获取配置文件列表");
|
logging!(debug, Type::Cmd, "获取配置文件列表");
|
||||||
let draft = Config::profiles().await;
|
let draft = Config::profiles().await;
|
||||||
let data = draft.data_arc();
|
let data = (**draft.data_arc()).clone();
|
||||||
Ok(data)
|
Ok(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user