From 643500bbdf1a169db1bcdcb8e971334037274d38 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 15 Sep 2021 14:49:13 +0700 Subject: Use `Option` to encode empty text case in hit test methods --- wgpu/src/backend.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wgpu/src/backend.rs') diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs index b31bf92c..51429e84 100644 --- a/wgpu/src/backend.rs +++ b/wgpu/src/backend.rs @@ -284,7 +284,7 @@ impl backend::Text for Backend { bounds: Size, point: iced_native::Point, nearest_only: bool, - ) -> text::Hit { + ) -> Option { self.text_pipeline.hit_test( contents, size, -- cgit