chore: justify welcome! macro with comment

This commit is contained in:
Nik Revenco 2025-04-02 16:02:40 +01:00
parent b1c7bd91b9
commit 3c0fcb0679

View file

@ -85,6 +85,10 @@ impl EditorView {
Center,
}
/// Declare the welcome screen declaratively using this macro
/// It avoids the performance overhead of calling `Vec<Option<_>>::flatten` and
/// makes it easy to get the longest line in the center and the left, without
/// having to iterate over the `Vec<_>` again.
macro_rules! welcome {
(
$([$align:ident] $line:expr, $(if $cond:expr;)?)* $(,)?