diff options
| author | Polesznyák Márk <contact@pml68.dev> | 2025-12-08 20:40:10 +0100 |
|---|---|---|
| committer | Polesznyák Márk <contact@pml68.dev> | 2026-02-05 14:43:01 +0100 |
| commit | 89fa86ab5bcfbca2f5e255fdb267a8ea9283d615 (patch) | |
| tree | 65307f801ed610a64d2bbc9f3a42511f6c630652 /src/text | |
| parent | docs: update changelog (diff) | |
| download | iced_selection-0.14.tar.gz | |
feat: prepare for release0.14
Diffstat (limited to '')
| -rw-r--r-- | src/text/rich.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/text/rich.rs b/src/text/rich.rs index e0f2a1c..5b43672 100644 --- a/src/text/rich.rs +++ b/src/text/rich.rs @@ -155,11 +155,15 @@ where /// Sets the message that will be produced when a link of the [`Rich`] text /// is clicked. + /// + /// If the spans of the [`Rich`] text contain no links, you may need to call + /// this method with `on_link_click(never)` in order for the compiler to infer + /// the proper `Link` generic type. pub fn on_link_click( mut self, - on_link_clicked: impl Fn(Link) -> Message + 'a, + on_link_click: impl Fn(Link) -> Message + 'a, ) -> Self { - self.on_link_click = Some(Box::new(on_link_clicked)); + self.on_link_click = Some(Box::new(on_link_click)); self } |
