windows: Remove allow(deadcode) (#29651)

Release Notes:

- N/A
This commit is contained in:
张小白 2025-04-30 15:39:19 +08:00 committed by GitHub
parent 9767033985
commit edda386827
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 24 deletions

View file

@ -1,6 +1,3 @@
// todo(windows): remove
#![cfg_attr(windows, allow(dead_code))]
mod app_menu;
mod keystroke;
@ -802,6 +799,7 @@ impl PlatformInputHandler {
.flatten()
}
#[cfg_attr(target_os = "windows", allow(dead_code))]
fn marked_text_range(&mut self) -> Option<Range<usize>> {
self.cx
.update(|window, cx| self.handler.marked_text_range(window, cx))
@ -809,7 +807,10 @@ impl PlatformInputHandler {
.flatten()
}
#[cfg_attr(any(target_os = "linux", target_os = "freebsd"), allow(dead_code))]
#[cfg_attr(
any(target_os = "linux", target_os = "freebsd", target_os = "windows"),
allow(dead_code)
)]
fn text_for_range(
&mut self,
range_utf16: Range<usize>,
@ -852,6 +853,7 @@ impl PlatformInputHandler {
.ok();
}
#[cfg_attr(target_os = "windows", allow(dead_code))]
fn unmark_text(&mut self) {
self.cx
.update(|window, cx| self.handler.unmark_text(window, cx))
@ -1069,7 +1071,10 @@ pub(crate) struct WindowParams {
#[cfg_attr(any(target_os = "linux", target_os = "freebsd"), allow(dead_code))]
pub is_movable: bool,
#[cfg_attr(any(target_os = "linux", target_os = "freebsd"), allow(dead_code))]
#[cfg_attr(
any(target_os = "linux", target_os = "freebsd", target_os = "windows"),
allow(dead_code)
)]
pub focus: bool,
#[cfg_attr(any(target_os = "linux", target_os = "freebsd"), allow(dead_code))]