mirror of
https://github.com/danbulant/cushy
synced 2026-05-22 21:59:02 +00:00
18 lines
339 B
Rust
18 lines
339 B
Rust
use cushy::widget::MakeWidget;
|
|
use cushy::widgets::VirtualList;
|
|
use cushy::Run;
|
|
|
|
// ANCHOR: list
|
|
fn list() -> impl MakeWidget {
|
|
VirtualList::new(50, |index| format!("Item {index}")).expand()
|
|
}
|
|
// ANCHOR_END: list
|
|
|
|
fn main() -> cushy::Result {
|
|
list().run()
|
|
}
|
|
|
|
#[test]
|
|
fn runs() {
|
|
cushy::example!(list).untested_still_frame();
|
|
}
|