Skip to main content

max / makeover-tui

Answer an unknown fill with None, and move to makeover-layout 0.4.0 Fill is non_exhaustive from 0.4.0, so this match takes a wildcard and the description can grow without breaking the build here. The arm is a real answer rather than a hole: fill already returns Option, and frame answers a missing intent with structure instead of a substituted colour. The member that prompted it, Fill::Sunken, is one a terminal genuinely cannot say. A cell has one background, so a surface set back by colour alone has no rendering; the chosen tab is drawn forward instead. That is why no palette member was added for it. 0.3.0 rather than a patch: fill takes makeover_layout::Fill in its public signature, so moving the dependency across 0.1 to 0.4 is breaking for consumers even though nothing in this crate's own surface changed.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-30 12:26 UTC
Signed with PGP, not checked
Commit: c46e5aaba824872081c955179a4330676bac8acf
Parent: ec1a3d7
2 files changed, +13 insertions, -3 deletions
M Cargo.toml +2 -2
@@ -1,6 +1,6 @@
1 1 [package]
2 2 name = "makeover-tui"
3 - version = "0.2.0"
3 + version = "0.3.0"
4 4 edition = "2024"
5 5 description = "The terminal renderer for makeover-layout, on ratatui. Colour stops being the constraint above 256 entries; geometry never does, because an edge occupies a whole cell on every side."
6 6 license = "MIT"
@@ -8,7 +8,7 @@
8 8
9 9 [dependencies]
10 10 ratatui = { version = "0.30", default-features = false }
11 - makeover-layout = "0.1.0"
11 + makeover-layout = "0.4.0"
12 12
13 13 [lints.rust]
14 14 unused = "warn"
M src/lib.rs +11 -1
@@ -142,10 +142,15 @@
142 142 }
143 143
144 144 impl Palette {
145 - /// Resolve a surface intent, or `None` where the theme has no such colour.
145 + /// Resolve a surface intent, or `None` where this renderer has no colour
146 + /// for it.
146 147 ///
147 148 /// No substitution happens here. A missing intent stays missing, and
148 149 /// [`frame`] answers it with structure instead of with a different colour.
150 + /// That rule is what lets the wildcard below be a real answer rather than
151 + /// a hole: [`Fill`] is `#[non_exhaustive]` from `makeover-layout` 0.4.0
152 + /// onward, so the description can name a surface this renderer has not
153 + /// learned to paint, and saying so is better than failing to build.
149 154 #[must_use]
150 155 pub const fn fill(&self, fill: Fill) -> Option<Color> {
151 156 match fill {
@@ -153,6 +158,11 @@
153 158 Fill::Raised => Some(self.raised),
154 159 Fill::Overlay => Some(self.overlay),
155 160 Fill::Well => self.well,
161 + // Includes Fill::Sunken, which this renderer has no tone for: a
162 + // terminal cell has one background, so a surface set back by
163 + // colour alone is not a thing it can say. The chosen tab is drawn
164 + // forward instead.
165 + _ => None,
156 166 }
157 167 }
158 168