Skip to content

Add let-else control flow - #504

Open
kriomant wants to merge 1 commit into
lambda-fairy:mainfrom
kriomant:main
Open

Add let-else control flow#504
kriomant wants to merge 1 commit into
lambda-fairy:mainfrom
kriomant:main

Conversation

@kriomant

@kriomant kriomant commented Jul 17, 2026

Copy link
Copy Markdown

Adds support for let-else control flow syntax in maud templates.

@let Some(value) = data else {
  "no data"
}
div { "data=" (data) }

is equivalent to

@if let Some(value) = data {
  div { "data=" (data) }
} else {
  "no data"
}

but let you focus on positive scenarios and doesn't increase indentation level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant