Skip to content

Commit

Permalink
Fix stack overflow in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp-M committed Nov 23, 2024
1 parent 133a1f0 commit 4b4d9b5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions masonry/src/testing/helper_widgets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -395,11 +395,13 @@ impl<S: 'static> Widget for ModularWidget<S> {
ctx: QueryCtx<'c>,
pos: Point,
) -> Option<WidgetRef<'c, dyn Widget>> {
(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 {
Expand Down

0 comments on commit 4b4d9b5

Please sign in to comment.