Skip to content

Commit 9c9ed0e

Browse files
committed
doc: use imperative tense more in render.rs.
1 parent 332c49e commit 9c9ed0e

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/theme.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ use console::{style, Style, StyledObject, Term};
55

66
/// Implements a theme for dialoguer.
77
pub trait Theme {
8-
/// Formats a prompt.
8+
/// Format a prompt.
99
#[inline]
1010
fn format_prompt(&self, f: &mut dyn fmt::Write, prompt: &str) -> fmt::Result {
1111
write!(f, "{}:", prompt)
1212
}
1313

14-
/// Formats out an error.
14+
/// Format out an error.
1515
#[inline]
1616
fn format_error(&self, f: &mut dyn fmt::Write, err: &str) -> fmt::Result {
1717
write!(f, "error: {}", err)
1818
}
1919

20-
/// Formats a confirm prompt.
20+
/// Format a confirmation prompt.
2121
fn format_confirm_prompt(
2222
&self,
2323
f: &mut dyn fmt::Write,
@@ -35,7 +35,7 @@ pub trait Theme {
3535
Ok(())
3636
}
3737

38-
/// Formats a confirm prompt after selection.
38+
/// Format a confirmation prompt after selection.
3939
fn format_confirm_prompt_selection(
4040
&self,
4141
f: &mut dyn fmt::Write,
@@ -58,7 +58,7 @@ pub trait Theme {
5858
}
5959
}
6060

61-
/// Formats an input prompt.
61+
/// Format an input prompt.
6262
fn format_input_prompt(
6363
&self,
6464
f: &mut dyn fmt::Write,
@@ -72,7 +72,7 @@ pub trait Theme {
7272
}
7373
}
7474

75-
/// Formats an input prompt after selection.
75+
/// Format an input prompt after selection.
7676
#[inline]
7777
fn format_input_prompt_selection(
7878
&self,
@@ -83,14 +83,14 @@ pub trait Theme {
8383
write!(f, "{}: {}", prompt, sel)
8484
}
8585

86-
/// Formats a password prompt.
86+
/// Format a password prompt.
8787
#[inline]
8888
#[cfg(feature = "password")]
8989
fn format_password_prompt(&self, f: &mut dyn fmt::Write, prompt: &str) -> fmt::Result {
9090
self.format_input_prompt(f, prompt, None)
9191
}
9292

93-
/// Formats a password prompt after selection.
93+
/// Format a password prompt after selection.
9494
#[inline]
9595
#[cfg(feature = "password")]
9696
fn format_password_prompt_selection(
@@ -101,13 +101,13 @@ pub trait Theme {
101101
self.format_input_prompt_selection(f, prompt, "[hidden]")
102102
}
103103

104-
/// Formats a select prompt.
104+
/// Format a select prompt.
105105
#[inline]
106106
fn format_select_prompt(&self, f: &mut dyn fmt::Write, prompt: &str) -> fmt::Result {
107107
self.format_prompt(f, prompt)
108108
}
109109

110-
/// Formats a select prompt after selection.
110+
/// Format a select prompt after selection.
111111
#[inline]
112112
fn format_select_prompt_selection(
113113
&self,
@@ -118,19 +118,19 @@ pub trait Theme {
118118
self.format_input_prompt_selection(f, prompt, sel)
119119
}
120120

121-
/// Formats a multi select prompt.
121+
/// Format a multi select prompt.
122122
#[inline]
123123
fn format_multi_select_prompt(&self, f: &mut dyn fmt::Write, prompt: &str) -> fmt::Result {
124124
self.format_prompt(f, prompt)
125125
}
126126

127-
/// Formats a sort prompt.
127+
/// Format a sort prompt.
128128
#[inline]
129129
fn format_sort_prompt(&self, f: &mut dyn fmt::Write, prompt: &str) -> fmt::Result {
130130
self.format_prompt(f, prompt)
131131
}
132132

133-
/// Formats a multi_select prompt after selection.
133+
/// Format a multi_select prompt after selection.
134134
fn format_multi_select_prompt_selection(
135135
&self,
136136
f: &mut dyn fmt::Write,
@@ -144,7 +144,7 @@ pub trait Theme {
144144
Ok(())
145145
}
146146

147-
/// Formats a sort prompt after selection.
147+
/// Format a sort prompt after selection.
148148
#[inline]
149149
fn format_sort_prompt_selection(
150150
&self,
@@ -155,7 +155,7 @@ pub trait Theme {
155155
self.format_multi_select_prompt_selection(f, prompt, selections)
156156
}
157157

158-
/// Formats a select prompt item.
158+
/// Format a select prompt item.
159159
fn format_select_prompt_item(
160160
&self,
161161
f: &mut dyn fmt::Write,
@@ -186,7 +186,7 @@ pub trait Theme {
186186
)
187187
}
188188

189-
/// Formats a sort prompt item.
189+
/// Format a sort prompt item.
190190
fn format_sort_prompt_item(
191191
&self,
192192
f: &mut dyn fmt::Write,
@@ -206,7 +206,7 @@ pub trait Theme {
206206
)
207207
}
208208

209-
/// Formats a fuzzy select prompt.
209+
/// Format a fuzzy select prompt.
210210
#[cfg(feature = "fuzzy-select")]
211211
fn format_fuzzy_select_prompt(
212212
&self,

0 commit comments

Comments
 (0)