Skip to main content

max / alloy_tui

4.0.1: Export fidelity from the crate root 4.0.0 removed detect_color_depth and named `fidelity` as the replacement, then did not re-export it. It stayed reachable as `theme::fidelity`, which is why nothing in this crate noticed: every internal caller goes through the module. The test that would have caught it now exists, and covers the rest of the list rather than just this one.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-31 02:44 UTC
Signed with PGP, not checked
Commit: b9e5ab3ecb270aa87a79e9fd2adf19f2b9a184db
Parent: f9b6423
2 files changed, +21 insertions, -2 deletions
M Cargo.toml +1 -1
@@ -1,6 +1,6 @@
1 1 [package]
2 2 name = "alloy_tui"
3 - version = "4.0.0"
3 + version = "4.0.1"
4 4 description = "Alloy design system: makeover intents rendered as ratatui Color/Style, plus themed widgets for the alloy console and siblings."
5 5 edition = "2024"
6 6 # 1.88 is ratatui 0.30.2's floor, and 0.30.2 is where `Block::shadow` lands.
M src/lib.rs +20 -1
@@ -40,5 +40,24 @@
40 40 pub use keys::{Action, classify};
41 41 pub use layout::{ConsoleAreas, PaneAreas, console, panes};
42 42 pub use selection::{MARKER, selected_style};
43 - pub use theme::{Fidelity, Mode, Theme, ThemeError, border_strong, border_subtle, mix_linear_srgb};
43 + pub use theme::{
44 + Fidelity, Mode, Theme, ThemeError, border_strong, border_subtle, fidelity, mix_linear_srgb,
45 + };
44 46 pub use widgets::*;
47 +
48 + #[cfg(test)]
49 + mod tests {
50 + // The crate root is the API. Every one of these is reachable through its
51 + // own module regardless, so a re-export missing from this list still
52 + // compiles everywhere inside the crate and breaks only at a call site
53 + // outside it. That is how 4.0.0 shipped without `fidelity`, which is the
54 + // replacement the same release told callers to move to.
55 + #[test]
56 + fn the_names_a_caller_is_told_to_use_are_exported_from_the_root() {
57 + let _: crate::Fidelity = crate::fidelity();
58 + let _: fn(&makeover::ThemeColors) -> _ = crate::Theme::from_theme;
59 + let _: fn(makeover::Rgb, makeover::Rgb) -> _ = crate::border_subtle;
60 + let _: fn(makeover::Rgb, makeover::Rgb) -> _ = crate::border_strong;
61 + let _: fn(makeover::Rgb, makeover::Rgb, f32) -> _ = crate::mix_linear_srgb;
62 + }
63 + }