Small change in iter
This commit is contained in:
+4
-12
@@ -16,20 +16,12 @@ pub fn app(screen: Arc<Screen>) -> Rsx {
|
|||||||
let count = use_state(1);
|
let count = use_state(1);
|
||||||
|
|
||||||
run! {
|
run! {
|
||||||
ref count {
|
ref count, items {
|
||||||
loop {
|
loop {
|
||||||
if count.get_dl() == 20 {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
std::thread::sleep(std::time::Duration::from_millis(200));
|
|
||||||
**count.get() += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
run! {
|
|
||||||
use count ref items {
|
|
||||||
items.get().push(count.get_dl());
|
items.get().push(count.get_dl());
|
||||||
|
**count.get() += 1;
|
||||||
|
std::thread::sleep(std::time::Duration::from_millis(100));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user