From 26a1a9ac3f412c26a5fa9225d31fade39db502a8 Mon Sep 17 00:00:00 2001 From: JL710 <76447362+JL710@users.noreply.github.com> Date: Wed, 17 Apr 2024 14:13:20 +0200 Subject: [PATCH] formatting by cargo fmt --- widget/src/text_input.rs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/widget/src/text_input.rs b/widget/src/text_input.rs index 562f41592d..5f820ab79b 100644 --- a/widget/src/text_input.rs +++ b/widget/src/text_input.rs @@ -133,18 +133,18 @@ where self } - /// Sets the message that should be produced when some text is typed into + /// Sets the message that should be produced when some text is typed into /// the [`TextInput`], if `Some`. /// /// If `None`, the [`TextInput`] will be disabled. - pub fn on_input_maybe(mut self, callback: Option) -> Self + pub fn on_input_maybe(mut self, callback: Option) -> Self where F: 'a + Fn(String) -> Message, { - self.on_input = match callback { - Some(c) => Some(Box::new(c)), - None => None - }; + self.on_input = match callback { + Some(c) => Some(Box::new(c)), + None => None, + }; self } @@ -155,10 +155,10 @@ where self } - /// Sets the message that should be produced when the [`TextInput`] is + /// Sets the message that should be produced when the [`TextInput`] is /// focused and the enter key is pressed, if `Some`. - /// - /// If `None` the [`TextInput`] nothing will happen. + /// + /// If `None` the [`TextInput`] nothing will happen. pub fn on_submit_maybe(mut self, on_submit: Option) -> Self { self.on_submit = on_submit; self @@ -173,19 +173,19 @@ where self.on_paste = Some(Box::new(on_paste)); self } - - /// Sets the message that should be produced when some text is pasted into + + /// Sets the message that should be produced when some text is pasted into /// the [`TextInput`], if `Some`. - /// - /// If `None` nothing will happen. + /// + /// If `None` nothing will happen. pub fn on_paste_maybe( mut self, on_paste: Option Message + 'a>, ) -> Self { - self.on_paste = match on_paste { - Some(func) => Some(Box::new(func)), - None => None - }; + self.on_paste = match on_paste { + Some(func) => Some(Box::new(func)), + None => None, + }; self }