well, it compiles. fails on run, though

This commit is contained in:
🪞👃🪞 2025-01-18 16:32:04 +01:00
parent a362028ae7
commit d14d67172c
6 changed files with 96 additions and 185 deletions

View file

@ -10,7 +10,7 @@ try_from_expr!(<'a, E>: When<RenderBox<'a, E>>: |state, iter| {
let iter = iter.clone();
let condition = iter.next();
if let Some((ref condition, _)) = condition {
let condition = state.get_bool(&condition.value).expect("no condition");
let condition = state.get(&condition.value).expect("no condition");
if let Some((ref content, _)) = iter.next() {
let content = state.get_content(&content.value).expect("no atom");
return Some(Self(condition, content))
@ -23,7 +23,7 @@ try_from_expr!(<'a, E>: Either<RenderBox<'a, E>, RenderBox<'a, E>>: |state, iter
let iter = iter.clone();
let condition = iter.next();
if let Some((ref condition, _)) = condition {
let condition = state.get_bool(&condition.value).expect("no condition");
let condition = state.get(&condition.value).expect("no condition");
if let Some((ref content1, _)) = iter.next() {
let content1 = state.get_content(&content1.value).expect("no content1");
if let Some((ref content2, _)) = iter.next() {