From ce614b5fa9560513f214eb8aa5c3069995e3c2ec Mon Sep 17 00:00:00 2001 From: rustdesk Date: Wed, 23 Sep 2026 20:39:29 +0800 Subject: [PATCH] cursor: let the kept-shape tests run without the flutter feature CI's cargo test builds the default features, and the two functions under test are pure, so they compile for every test build and the module loses its feature gate. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01EZ49AbZJYfm8NTp5yDPMab --- src/client/io_loop.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/io_loop.rs b/src/client/io_loop.rs index e98099ca0..93cee77f3 100644 --- a/src/client/io_loop.rs +++ b/src/client/io_loop.rs @@ -2617,7 +2617,7 @@ impl Remote { /// A shape that decoded, still compressed, under the id the UI knows it by. Copied once it /// decoded: the message's colors may be a slice of a larger received buffer, which a clone /// would keep alive. -#[cfg(feature = "flutter")] +#[cfg(any(feature = "flutter", test))] fn cursor_shape(id: u64, cd: &CursorData, compressed: &[u8]) -> CursorData { CursorData { id, @@ -2631,7 +2631,7 @@ fn cursor_shape(id: u64, cd: &CursorData, compressed: &[u8]) -> CursorData { } /// The RGBA of a shape kept by `Session::cursor_shapes`, for the UI to draw it again. -#[cfg(feature = "flutter")] +#[cfg(any(feature = "flutter", test))] pub(crate) fn kept_cursor_rgba(shape: CursorData) -> hbb_common::ResultType { decode_cursor_data(shape) } @@ -2892,7 +2892,7 @@ mod cursor_dedupe_tests { } } -#[cfg(all(test, feature = "flutter"))] +#[cfg(test)] mod kept_cursor_tests { use super::*;