@@ -5,7 +5,7 @@ use crate::theme::{SimpleTheme, TermThemeRenderer, Theme};
5
5
6
6
use console:: { Key , Term } ;
7
7
8
- /// Renders a select prompt.
8
+ /// Render a selection prompt.
9
9
///
10
10
/// User can select from one or more options.
11
11
/// 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> {
51
51
}
52
52
53
53
impl Select < ' static > {
54
- /// Creates a select prompt builder with default theme.
54
+ /// Create a selection prompt builder with default theme.
55
55
pub fn new ( ) -> Self {
56
56
Self :: with_theme ( & SimpleTheme )
57
57
}
58
58
}
59
59
60
60
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.
62
62
///
63
63
/// The default is to clear the menu.
64
64
pub fn clear ( & mut self , val : bool ) -> & mut Self {
65
65
self . clear = val;
66
66
self
67
67
}
68
68
69
- /// Sets initial selected element when select menu is rendered
69
+ /// Set the initial selected element when the selection menu is rendered.
70
70
///
71
71
/// Element is indicated by the index at which it appears in `item` method invocation or `items` slice.
72
72
pub fn default ( & mut self , val : usize ) -> & mut Self {
@@ -106,7 +106,7 @@ impl Select<'_> {
106
106
self
107
107
}
108
108
109
- /// Adds multiple items to the selector.
109
+ /// Add multiple items to the selector.
110
110
///
111
111
/// ## Examples
112
112
/// ```rust,no_run
@@ -130,7 +130,7 @@ impl Select<'_> {
130
130
self
131
131
}
132
132
133
- /// Sets the select prompt.
133
+ /// Set the selection prompt.
134
134
///
135
135
/// By default, when a prompt is set the system also prints out a confirmation after
136
136
/// the selection. You can opt-out of this with [`report`](#method.report).
@@ -155,15 +155,15 @@ impl Select<'_> {
155
155
self
156
156
}
157
157
158
- /// Indicates whether to report the selected value after interaction.
158
+ /// Indicate whether to report the selected value after interaction.
159
159
///
160
160
/// The default is to report the selection.
161
161
pub fn report ( & mut self , val : bool ) -> & mut Self {
162
162
self . report = val;
163
163
self
164
164
}
165
165
166
- /// Enables user interaction and returns the result.
166
+ /// Enable user interaction and return the result.
167
167
///
168
168
/// The user can select the items with the 'Space' bar or 'Enter' and the index of selected item will be returned.
169
169
/// The dialog is rendered on stderr.
@@ -174,7 +174,7 @@ impl Select<'_> {
174
174
self . interact_on ( & Term :: stderr ( ) )
175
175
}
176
176
177
- /// Enables user interaction and returns the result.
177
+ /// Enable user interaction and return the result.
178
178
///
179
179
/// The user can select the items with the 'Space' bar or 'Enter' and the index of selected item will be returned.
180
180
/// The dialog is rendered on stderr.
@@ -350,7 +350,7 @@ impl Select<'_> {
350
350
}
351
351
352
352
impl < ' a > Select < ' a > {
353
- /// Creates a select prompt builder with a specific theme.
353
+ /// Create a selection prompt builder with a specific theme.
354
354
///
355
355
/// ## Examples
356
356
/// ```rust,no_run
0 commit comments