From 9dd20ead085ff3b9b4bd441b5e4938cf8e813f35 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 15 Feb 2024 02:01:56 +0100 Subject: Rename `password` method in `TextInput` to `secure` --- examples/modal/src/main.rs | 2 +- examples/tour/src/main.rs | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/modal/src/main.rs b/examples/modal/src/main.rs index 6fe951ee..1dac0075 100644 --- a/examples/modal/src/main.rs +++ b/examples/modal/src/main.rs @@ -157,7 +157,7 @@ impl Application for App { text_input("", &self.password) .on_input(Message::Password) .on_submit(Message::Submit) - .password() + .secure(true) .padding(5), ] .spacing(5), diff --git a/examples/tour/src/main.rs b/examples/tour/src/main.rs index 6d24b5ec..15d37896 100644 --- a/examples/tour/src/main.rs +++ b/examples/tour/src/main.rs @@ -613,11 +613,7 @@ impl<'a> Step { Self::container("Text input") .push("Use a text input to ask for different kinds of information.") - .push(if is_secure { - text_input.password() - } else { - text_input - }) + .push(text_input.secure(is_secure)) .push( checkbox("Enable password mode", is_secure) .on_toggle(StepMessage::ToggleSecureInput), -- cgit