mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
refactor: simplify function return types and remove unnecessary wraps
This commit is contained in:
@@ -57,9 +57,7 @@ impl Config {
|
||||
Self::ensure_default_profile_items().await?;
|
||||
|
||||
// init Tun mode
|
||||
if !cmd::system::is_admin().unwrap_or_default()
|
||||
&& service::is_service_available().await.is_err()
|
||||
{
|
||||
if !cmd::system::is_admin() && service::is_service_available().await.is_err() {
|
||||
let verge = Self::verge().await;
|
||||
verge.edit_draft(|d| {
|
||||
d.enable_tun_mode = Some(false);
|
||||
|
||||
@@ -581,6 +581,7 @@ impl PrfItem {
|
||||
}
|
||||
|
||||
// 向前兼容,默认为订阅启用自动更新
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
const fn default_allow_auto_update() -> Option<bool> {
|
||||
Some(true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user