Say what these do without naming what they lean on

A doc comment that names something outside the method goes stale when
that thing changes, and nobody editing it looks here.
This commit is contained in:
iris committed 2026-09-13 21:37:44 -04:00
1 parent 7eb2b85425
commit 0f9f379cec
2 files changed
+6 -7

No files matched your search

+2 -2
View File
@@ -13,8 +13,8 @@ impl<F: FnOnce(&mut Rsc::State, &mut Rsc) + Send, Rsc: HasState> TaskUpdate<Rsc>
/// Hands an update from a task to the thread that owns the ui. Delivery and /// Hands an update from a task to the thread that owns the ui. Delivery and
/// waking are one act: a host posts the update as a message its loop already /// waking are one act: a host posts the update as a message its loop already
/// carries -- winit's `EventLoopProxy`, Android's looper -- so nothing has to /// carries, so nothing has to wake the loop separately, or claim a redraw to
/// wake the loop separately, or claim a redraw to be looked at. /// be looked at.
pub trait TaskQueue<Rsc: HasState>: Send + Sync + 'static { pub trait TaskQueue<Rsc: HasState>: Send + Sync + 'static {
fn send(&self, update: Box<dyn TaskUpdate<Rsc>>); fn send(&self, update: Box<dyn TaskUpdate<Rsc>>);
} }
+4 -5
View File
@@ -151,9 +151,8 @@ impl Harness {
self.sense(); self.sense();
} }
/// A wheel carries no position, so this goes wherever /// A wheel carries no position, so this goes wherever the cursor was last
/// [`move_to`](Self::move_to) last put the cursor -- nowhere, until it has /// moved to -- nowhere, until it has been moved.
/// been called.
pub fn scroll(&mut self, delta: impl Into<Vec2>) { pub fn scroll(&mut self, delta: impl Into<Vec2>) {
self.cursor.scroll_delta = delta.into(); self.cursor.scroll_delta = delta.into();
self.sense(); self.sense();
@@ -174,8 +173,8 @@ impl Harness {
} }
} }
/// Dispatches against the last [`frame`](Self::frame)'s layout, which is /// Dispatches against the layout of the last frame, which is what a
/// what a window delivers input against too. /// window delivers input against too.
fn sense(&mut self) { fn sense(&mut self) {
let cursor = self.cursor.clone(); let cursor = self.cursor.clone();
let size = self.render.output_size(); let size = self.render.output_size();