mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-05 05:50:04 +08:00
refactor(profile): extract profile models and index rules
Move profile models and index rules into the crate, preserving serialization and returning a typed missing-profile error.
This commit is contained in:
@@ -2,7 +2,7 @@ use crate::core::notify::NoticeStatus;
|
||||
use crate::core::notify::{Refresh, announce};
|
||||
use crate::{
|
||||
cmd,
|
||||
config::{Config, PrfItem, PrfOption, profiles::profiles_update_item_safe},
|
||||
config::{Config, PrfOption, fetch_remote_profile, profiles::profiles_update_item_safe},
|
||||
core::{CoreManager, handle, tray, validate::ValidationOutcome},
|
||||
process::AsyncHandler,
|
||||
utils::help::{mask_err, mask_url},
|
||||
@@ -289,7 +289,7 @@ async fn perform_profile_update(
|
||||
}
|
||||
tracing::Span::current().record("strategy", name);
|
||||
let started = std::time::Instant::now();
|
||||
let result = PrfItem::from_url(url, None, None, options.as_ref()).await;
|
||||
let result = fetch_remote_profile(url, None, None, options.as_ref()).await;
|
||||
let elapsed_field = match strategy {
|
||||
Strategy::Configured => "configured_elapsed",
|
||||
Strategy::Clash => "clash_elapsed",
|
||||
|
||||
Reference in New Issue
Block a user