mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-28 07:14:40 +08:00
fix(config): update home_cards reference to use as_ref() for improved handling
This commit is contained in:
@@ -215,11 +215,8 @@ mod tests {
|
||||
let draft = Draft::new(IVerge::default());
|
||||
|
||||
#[allow(clippy::unwrap_used)]
|
||||
let err = block_on_ready(draft.with_data_modify(|v| async move {
|
||||
drop(v);
|
||||
Err::<(IVerge, ()), _>(anyhow!("boom"))
|
||||
}))
|
||||
.unwrap_err();
|
||||
let err = block_on_ready(draft.with_data_modify(|_v| async move { Err::<(IVerge, ()), _>(anyhow!("boom")) }))
|
||||
.unwrap_err();
|
||||
|
||||
assert_eq!(format!("{err}"), "boom");
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ fn determine_update_flags(patch: &IVerge) -> UpdateFlags {
|
||||
// let enable_tray_icon = patch.enable_tray_icon;
|
||||
let enable_global_hotkey = patch.enable_global_hotkey;
|
||||
let tray_event = &patch.tray_event;
|
||||
let home_cards = patch.home_cards.clone();
|
||||
let home_cards = patch.home_cards.as_ref();
|
||||
let enable_auto_light_weight = patch.enable_auto_light_weight_mode;
|
||||
let enable_external_controller = patch.enable_external_controller;
|
||||
let tray_proxy_groups_display_mode = &patch.tray_proxy_groups_display_mode;
|
||||
|
||||
Reference in New Issue
Block a user