Skip to content

Commit 86ebe75

Browse files
committed
doc: Use imperative tense in select.rs.
In addition, consistently speak of a 'selection prompt'.
1 parent 9c9ed0e commit 86ebe75

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/prompts/select.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::theme::{SimpleTheme, TermThemeRenderer, Theme};
55

66
use console::{Key, Term};
77

8-
/// Renders a select prompt.
8+
/// Render a selection prompt.
99
///
1010
/// User can select from one or more options.
1111
/// Interaction returns index of an item selected in the order they appear in `item` invocation or `items` slice.
@@ -51,22 +51,22 @@ impl Default for Select<'static> {
5151
}
5252

5353
impl Select<'static> {
54-
/// Creates a select prompt builder with default theme.
54+
/// Create a selection prompt builder with default theme.
5555
pub fn new() -> Self {
5656
Self::with_theme(&SimpleTheme)
5757
}
5858
}
5959

6060
impl Select<'_> {
61-
/// Indicates whether select menu should be erased from the screen after interaction.
61+
/// Indicate whether the selection menu should be erased from the screen after interaction.
6262
///
6363
/// The default is to clear the menu.
6464
pub fn clear(&mut self, val: bool) -> &mut Self {
6565
self.clear = val;
6666
self
6767
}
6868

69-
/// Sets initial selected element when select menu is rendered
69+
/// Set the initial selected element when the selection menu is rendered.
7070
///
7171
/// Element is indicated by the index at which it appears in `item` method invocation or `items` slice.
7272
pub fn default(&mut self, val: usize) -> &mut Self {
@@ -106,7 +106,7 @@ impl Select<'_> {
106106
self
107107
}
108108

109-
/// Adds multiple items to the selector.
109+
/// Add multiple items to the selector.
110110
///
111111
/// ## Examples
112112
/// ```rust,no_run
@@ -130,7 +130,7 @@ impl Select<'_> {
130130
self
131131
}
132132

133-
/// Sets the select prompt.
133+
/// Set the selection prompt.
134134
///
135135
/// By default, when a prompt is set the system also prints out a confirmation after
136136
/// the selection. You can opt-out of this with [`report`](#method.report).
@@ -155,15 +155,15 @@ impl Select<'_> {
155155
self
156156
}
157157

158-
/// Indicates whether to report the selected value after interaction.
158+
/// Indicate whether to report the selected value after interaction.
159159
///
160160
/// The default is to report the selection.
161161
pub fn report(&mut self, val: bool) -> &mut Self {
162162
self.report = val;
163163
self
164164
}
165165

166-
/// Enables user interaction and returns the result.
166+
/// Enable user interaction and return the result.
167167
///
168168
/// The user can select the items with the 'Space' bar or 'Enter' and the index of selected item will be returned.
169169
/// The dialog is rendered on stderr.
@@ -174,7 +174,7 @@ impl Select<'_> {
174174
self.interact_on(&Term::stderr())
175175
}
176176

177-
/// Enables user interaction and returns the result.
177+
/// Enable user interaction and return the result.
178178
///
179179
/// The user can select the items with the 'Space' bar or 'Enter' and the index of selected item will be returned.
180180
/// The dialog is rendered on stderr.
@@ -350,7 +350,7 @@ impl Select<'_> {
350350
}
351351

352352
impl<'a> Select<'a> {
353-
/// Creates a select prompt builder with a specific theme.
353+
/// Create a selection prompt builder with a specific theme.
354354
///
355355
/// ## Examples
356356
/// ```rust,no_run

0 commit comments

Comments
 (0)