From 7ab99ac7f280c9d0f10414902f42ad7814906d51 Mon Sep 17 00:00:00 2001 From: nightcityblade Date: Sat, 5 Sep 2026 11:08:25 +0800 Subject: [PATCH] fix: make Style non-exhaustive Signed-off-by: nightcityblade --- crates/termlens/src/screen.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/termlens/src/screen.rs b/crates/termlens/src/screen.rs index f2a290d..6bbfd4a 100644 --- a/crates/termlens/src/screen.rs +++ b/crates/termlens/src/screen.rs @@ -37,7 +37,11 @@ pub enum Color { /// /// Inspect them per cell via [`Cell::style`], or snapshot them wholesale /// with [`Screen::with_styles`] (plain snapshots stay text-only). +/// More terminal attributes may be added in future releases. To construct a +/// style for comparison, start from `Style::default()` and assign the fields +/// relevant to the assertion rather than using a struct literal. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] +#[non_exhaustive] pub struct Style { /// Foreground color. pub fg: Color,