epoch_forge/lib_efo/src/output.rs

13 lines
378 B
Rust

//! Compile-time selection of decorative terminal symbols.
/// Select a Nerd Font icon in default builds and a portable Unicode fallback
/// when the `nerd-fonts` feature is disabled.
#[must_use]
pub const fn symbol(nerd_font: &'static str, portable: &'static str) -> &'static str {
if cfg!(feature = "nerd-fonts") {
nerd_font
} else {
portable
}
}