@@ -5,7 +5,7 @@ use crate::theme::{SimpleTheme, TermThemeRenderer, Theme};
55use console:: Term ;
66use zeroize:: Zeroizing ;
77
8- /// Renders a password input prompt.
8+ /// Render a password input prompt.
99///
1010/// ## Example usage
1111///
@@ -34,20 +34,20 @@ impl Default for Password<'static> {
3434}
3535
3636impl Password < ' static > {
37- /// Creates a password input prompt.
37+ /// Create a password input prompt.
3838 pub fn new ( ) -> Password < ' static > {
3939 Self :: with_theme ( & SimpleTheme )
4040 }
4141}
4242
4343impl Password < ' _ > {
44- /// Sets the password input prompt.
44+ /// Set the password input prompt.
4545 pub fn with_prompt < S : Into < String > > ( & mut self , prompt : S ) -> & mut Self {
4646 self . prompt = prompt. into ( ) ;
4747 self
4848 }
4949
50- /// Indicates whether to report confirmation after interaction.
50+ /// Indicate whether to report confirmation after interaction.
5151 ///
5252 /// The default is to report.
5353 pub fn report ( & mut self , val : bool ) -> & mut Self {
@@ -73,15 +73,15 @@ impl Password<'_> {
7373 self
7474 }
7575
76- /// Enables user interaction and returns the result.
76+ /// Enable user interaction and return the result.
7777 ///
7878 /// If the user confirms the result is `true`, `false` otherwise.
7979 /// The dialog is rendered on stderr.
8080 pub fn interact ( & self ) -> io:: Result < String > {
8181 self . interact_on ( & Term :: stderr ( ) )
8282 }
8383
84- /// Like `interact` but allows a specific terminal to be set.
84+ /// Like [ `interact`](#method::interact), but allow a specific terminal to be set.
8585 pub fn interact_on ( & self , term : & Term ) -> io:: Result < String > {
8686 let mut render = TermThemeRenderer :: new ( term, self . theme ) ;
8787 render. set_prompts_reset_height ( false ) ;
@@ -131,7 +131,7 @@ impl Password<'_> {
131131}
132132
133133impl < ' a > Password < ' a > {
134- /// Creates a password input prompt with a specific theme.
134+ /// Create a password input prompt with a specific theme.
135135 pub fn with_theme ( theme : & ' a dyn Theme ) -> Self {
136136 Self {
137137 prompt : "" . into ( ) ,
0 commit comments