fix: clippy error on macOS

This commit is contained in:
Tunglies 2026-04-10 21:40:29 +08:00
parent 9e5da1a851
commit 0e38ccbb9d
No known key found for this signature in database
GPG Key ID: B9B01B389469B3E8
2 changed files with 2 additions and 3 deletions

View File

@ -150,9 +150,8 @@ impl<T> MihomoWsEventStream<T> {
_ = &mut sleep => {
if self.last_valid_event_at.elapsed() >= stale_timeout {
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);
}
}
}

View File

@ -32,7 +32,7 @@ thread_local! {
/// 托盘速率富文本属性字典(主线程缓存,避免每帧重建 ObjC 对象)。
/// 仅在首次调用时初始化,后续复用同一实例。
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()) };
}
/// 将上行/下行速率格式化为两行定宽文本