From 88f45198413c180e608a485a1a70b9cd5a919e83 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 27 Aug 2026 18:26:36 +0200 Subject: kstd: units: improve formatter --- libs/kstd/kstd/units.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/kstd/kstd/units.hpp b/libs/kstd/kstd/units.hpp index 95e531b8..1a4826db 100644 --- a/libs/kstd/kstd/units.hpp +++ b/libs/kstd/kstd/units.hpp @@ -134,7 +134,10 @@ struct kstd::formatter : kstd::formatter constexpr auto format(kstd::bytes const & id, kstd::format_context & ctx) const -> void { kstd::formatter::format(id.value, ctx); - ctx.push(" bytes"); + if (specifiers.alternative_form) + { + ctx.push(" bytes"); + } } }; #endif -- cgit v1.2.3