summaryrefslogtreecommitdiffstats
path: root/native/src/widget/text.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-09-15 14:49:13 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-09-15 14:49:13 +0700
commit643500bbdf1a169db1bcdcb8e971334037274d38 (patch)
treec2e4131f9bdc788052b584da05a6ee1ce2e8d71b /native/src/widget/text.rs
parent93fec8d273ef8305e1c2456abe0c8ecd7a9d9407 (diff)
downloadiced-643500bbdf1a169db1bcdcb8e971334037274d38.tar.gz
iced-643500bbdf1a169db1bcdcb8e971334037274d38.tar.bz2
iced-643500bbdf1a169db1bcdcb8e971334037274d38.zip
Use `Option` to encode empty text case in hit test methods
Diffstat (limited to '')
-rw-r--r--native/src/widget/text.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/native/src/widget/text.rs b/native/src/widget/text.rs
index adf6a74f..d8bc0a00 100644
--- a/native/src/widget/text.rs
+++ b/native/src/widget/text.rs
@@ -196,7 +196,7 @@ pub trait Renderer: crate::Renderer {
bounds: Size,
point: Point,
nearest_only: bool,
- ) -> Hit;
+ ) -> Option<Hit>;
/// Draws a [`Text`] fragment.
///