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
/// 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
/// wake the loop separately, or claim a redraw to be looked at.
/// carries, so nothing has to wake the loop separately, or claim a redraw to
/// be looked at.
pub trait TaskQueue<Rsc: HasState>: Send + Sync + 'static {
fn send(&self, update: Box<dyn TaskUpdate<Rsc>>);
}
+4 -5
View File
@@ -151,9 +151,8 @@ impl Harness {
self.sense();
}
/// A wheel carries no position, so this goes wherever
/// [`move_to`](Self::move_to) last put the cursor -- nowhere, until it has
/// been called.
/// A wheel carries no position, so this goes wherever the cursor was last
/// moved to -- nowhere, until it has been moved.
pub fn scroll(&mut self, delta: impl Into<Vec2>) {
self.cursor.scroll_delta = delta.into();
self.sense();
@@ -174,8 +173,8 @@ impl Harness {
}
}
/// Dispatches against the last [`frame`](Self::frame)'s layout, which is
/// what a window delivers input against too.
/// Dispatches against the layout of the last frame, which is what a
/// window delivers input against too.
fn sense(&mut self) {
let cursor = self.cursor.clone();
let size = self.render.output_size();