I love control flow

This commit is contained in:
2025-11-20 22:48:08 -05:00
parent f6f9ebbe51
commit dff72d2c43
19 changed files with 126 additions and 63 deletions

View File

@@ -26,7 +26,6 @@ impl TextEdit {
.lines
.iter()
.map(|l| l.text())
// why is this needed?? what??
.collect::<Vec<_>>()
.join("\n")
}
@@ -44,9 +43,7 @@ impl Widget for TextEdit {
let size = vec2(1, self.attrs.line_height);
painter.primitive_within(
RectPrimitive::color(Color::WHITE),
size.align(Align::TOP_LEFT)
.offset(offset)
.within(&region),
size.align(Align::TOP_LEFT).offset(offset).within(&region),
);
}
}