mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-13 05:20:28 +08:00
fix: clippy error on macOS
This commit is contained in:
parent
9e5da1a851
commit
0e38ccbb9d
@ -150,9 +150,8 @@ impl<T> MihomoWsEventStream<T> {
|
|||||||
_ = &mut sleep => {
|
_ = &mut sleep => {
|
||||||
if self.last_valid_event_at.elapsed() >= stale_timeout {
|
if self.last_valid_event_at.elapsed() >= stale_timeout {
|
||||||
return StreamConsumeState::Stale;
|
return StreamConsumeState::Stale;
|
||||||
} else {
|
|
||||||
sleep.as_mut().reset(self.last_valid_event_at + stale_timeout);
|
|
||||||
}
|
}
|
||||||
|
sleep.as_mut().reset(self.last_valid_event_at + stale_timeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ thread_local! {
|
|||||||
/// 托盘速率富文本属性字典(主线程缓存,避免每帧重建 ObjC 对象)。
|
/// 托盘速率富文本属性字典(主线程缓存,避免每帧重建 ObjC 对象)。
|
||||||
/// 仅在首次调用时初始化,后续复用同一实例。
|
/// 仅在首次调用时初始化,后续复用同一实例。
|
||||||
static TRAY_SPEED_ATTRS: Retained<NSDictionary<NSString, AnyObject>> = build_attributes();
|
static TRAY_SPEED_ATTRS: Retained<NSDictionary<NSString, AnyObject>> = build_attributes();
|
||||||
static LAST_DISPLAY_STR: RefCell<String> = RefCell::new(String::new());
|
static LAST_DISPLAY_STR: RefCell<String> = const { RefCell::new(String::new()) };
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 将上行/下行速率格式化为两行定宽文本
|
/// 将上行/下行速率格式化为两行定宽文本
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user