diff --git a/crates/ui-contract/src/primitives/text_adapter.rs b/crates/ui-contract/src/primitives/text_adapter.rs index ca277b143..cb6135c78 100644 --- a/crates/ui-contract/src/primitives/text_adapter.rs +++ b/crates/ui-contract/src/primitives/text_adapter.rs @@ -473,9 +473,7 @@ pub(crate) fn run(state: &mut TextState, mut input: AdapterIn<'_>) -> AdapterOut if input.options.multiline() { input.intents.take(Intent::SubmitForce); } - } else if separated { - state.end = Some(End::Separator); - } else if stepped && state.end.is_none() { + } else if separated || (stepped && state.end.is_none()) { state.end = Some(End::Separator); } else if shown.lost_focus && !input.held && state.draft.is_some() && state.end.is_none() { state.end = Some(End::Blur); diff --git a/crates/ui-contract/src/runtime/wheel.rs b/crates/ui-contract/src/runtime/wheel.rs index ad29d162c..fd97d573f 100644 --- a/crates/ui-contract/src/runtime/wheel.rs +++ b/crates/ui-contract/src/runtime/wheel.rs @@ -132,7 +132,7 @@ pub(crate) fn begin(ctx: &Context) { } // A value control that owns the running gesture hears its end without a timer of its own: a pass at the gap. let value_owner = state.gesture.owner.is_some_and(|owner| state.last.iter().any(|taker| taker.owner == owner && taker.value)); - (value_owner && state.gesture.runs(now)).then(|| state.gesture.last + GESTURE_GAP - now) + (value_owner && state.gesture.runs(now)).then_some(state.gesture.last + GESTURE_GAP - now) }); if let Some(seconds) = wake { repaint::request_after(ctx, viewport, seconds.max(0.0)); diff --git a/crates/ui-contract/src/testing/icon_trials.rs b/crates/ui-contract/src/testing/icon_trials.rs index e7241483e..9b3c89823 100644 --- a/crates/ui-contract/src/testing/icon_trials.rs +++ b/crates/ui-contract/src/testing/icon_trials.rs @@ -23,6 +23,7 @@ fn icon(name: &'static str) -> Option { SvgIcon::of(&tokens, Direction::Ltr, 24.0, &IconId::from(std::borrow::Cow::Borrowed(name)), IconSet::default(), Mirror::Auto) } +#[expect(clippy::expect_used, reason = "the trials name icons of the built-in set; a missing one fails the trial")] fn mask(name: &'static str) -> ColorImage { icon(name).expect("the name resolves").mask(24.0, 1.0) }