diff options
Diffstat (limited to 'pure/src/widget')
| -rw-r--r-- | pure/src/widget/text_input.rs | 13 | 
1 files changed, 8 insertions, 5 deletions
| diff --git a/pure/src/widget/text_input.rs b/pure/src/widget/text_input.rs index 88726a52..34edef28 100644 --- a/pure/src/widget/text_input.rs +++ b/pure/src/widget/text_input.rs @@ -87,14 +87,17 @@ where          self.is_secure = true;          self      } -    /// Set's the message that should be produced when a message is pasted into the [`TextInput`]. -    pub fn on_paste<OnPaste>(mut self, on_paste: OnPaste) -> Self -    where -        OnPaste: 'a + Fn(String) -> Message, -    { + +    /// Sets the message that should be produced when some text is pasted into +    /// the [`TextInput`]. +    pub fn on_paste( +        mut self, +        on_paste: impl Fn(String) -> Message + 'a, +    ) -> Self {          self.on_paste = Some(Box::new(on_paste));          self      } +      /// Sets the [`Font`] of the [`TextInput`].      ///      /// [`Font`]: text::Renderer::Font | 
