From 4b4d9b58616f884a9c9b03a271d71c768a06ae28 Mon Sep 17 00:00:00 2001 From: Philipp Mildenberger Date: Sat, 23 Nov 2024 14:31:28 +0100 Subject: [PATCH] Fix stack overflow in tests --- masonry/src/testing/helper_widgets.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/masonry/src/testing/helper_widgets.rs b/masonry/src/testing/helper_widgets.rs index 29040e817..70c551526 100644 --- a/masonry/src/testing/helper_widgets.rs +++ b/masonry/src/testing/helper_widgets.rs @@ -16,7 +16,7 @@ use accesskit::{Node, Role}; use smallvec::SmallVec; use tracing::trace_span; use vello::Scene; -use widget::widget::AsDynWidget as _; +use widget::widget::{find_widget_at_pos, AsDynWidget as _}; use widget::WidgetRef; use crate::event::{PointerEvent, TextEvent}; @@ -395,11 +395,13 @@ impl Widget for ModularWidget { ctx: QueryCtx<'c>, pos: Point, ) -> Option> { - (WidgetRef { - widget: self.as_dyn(), - ctx, - }) - .find_widget_at_pos(pos) + find_widget_at_pos( + &WidgetRef { + widget: self.as_dyn(), + ctx, + }, + pos, + ) } fn type_name(&self) -> &'static str {