mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2026-08-07 22:17:07 +02:00
fix Exit; document Size
This commit is contained in:
parent
0273d2ac75
commit
cb382cf12e
3 changed files with 8 additions and 4 deletions
|
|
@ -4,7 +4,7 @@ use crate::Usually;
|
|||
#[derive(Clone)] pub struct Exit(Arc<AtomicBool>);
|
||||
|
||||
impl Exit {
|
||||
pub fn run <T> (run: impl Fn(Self)->Usually<T>) -> Usually<T> {
|
||||
pub fn run <T> (run: impl FnOnce(Self)->Usually<T>) -> Usually<T> {
|
||||
run(Self(Arc::new(AtomicBool::new(false))))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue