From cb382cf12e9169310ddab4eca2ca01e87fde9869 Mon Sep 17 00:00:00 2001 From: facile pop culture reference Date: Thu, 25 Jun 2026 10:56:13 +0300 Subject: [PATCH] fix Exit; document Size --- dizzle | 2 +- src/exit.rs | 2 +- src/space/size.rs | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dizzle b/dizzle index 2dbf9d8..4da276a 160000 --- a/dizzle +++ b/dizzle @@ -1 +1 @@ -Subproject commit 2dbf9d8797a3642f69813be4ef3613836e061b94 +Subproject commit 4da276af7be5690f0a7a763de3710433a9700c3c diff --git a/src/exit.rs b/src/exit.rs index afdc2ad..787e3e5 100644 --- a/src/exit.rs +++ b/src/exit.rs @@ -4,7 +4,7 @@ use crate::Usually; #[derive(Clone)] pub struct Exit(Arc); impl Exit { - pub fn run (run: impl Fn(Self)->Usually) -> Usually { + pub fn run (run: impl FnOnce(Self)->Usually) -> Usually { run(Self(Arc::new(AtomicBool::new(false)))) } } diff --git a/src/space/size.rs b/src/space/size.rs index 7a275ac..4614ff1 100644 --- a/src/space/size.rs +++ b/src/space/size.rs @@ -3,7 +3,12 @@ use super::*; /// Uses [AtomicUsize] to measure size during\ /// rendering (which is normally read-only). #[derive(Default, Debug, Clone)] -pub struct Size(Arc, Arc); +pub struct Size( + /// Width + pub Arc, + /// Height + pub Arc, +); impl PartialEq for Size { fn eq (&self, _: &Self) -> bool { @@ -31,4 +36,3 @@ impl Size { }) } } -