@@ -5,19 +5,19 @@ use console::{style, Style, StyledObject, Term};
5
5
6
6
/// Implements a theme for dialoguer.
7
7
pub trait Theme {
8
- /// Formats a prompt.
8
+ /// Format a prompt.
9
9
#[ inline]
10
10
fn format_prompt ( & self , f : & mut dyn fmt:: Write , prompt : & str ) -> fmt:: Result {
11
11
write ! ( f, "{}:" , prompt)
12
12
}
13
13
14
- /// Formats out an error.
14
+ /// Format out an error.
15
15
#[ inline]
16
16
fn format_error ( & self , f : & mut dyn fmt:: Write , err : & str ) -> fmt:: Result {
17
17
write ! ( f, "error: {}" , err)
18
18
}
19
19
20
- /// Formats a confirm prompt.
20
+ /// Format a confirmation prompt.
21
21
fn format_confirm_prompt (
22
22
& self ,
23
23
f : & mut dyn fmt:: Write ,
@@ -35,7 +35,7 @@ pub trait Theme {
35
35
Ok ( ( ) )
36
36
}
37
37
38
- /// Formats a confirm prompt after selection.
38
+ /// Format a confirmation prompt after selection.
39
39
fn format_confirm_prompt_selection (
40
40
& self ,
41
41
f : & mut dyn fmt:: Write ,
@@ -58,7 +58,7 @@ pub trait Theme {
58
58
}
59
59
}
60
60
61
- /// Formats an input prompt.
61
+ /// Format an input prompt.
62
62
fn format_input_prompt (
63
63
& self ,
64
64
f : & mut dyn fmt:: Write ,
@@ -72,7 +72,7 @@ pub trait Theme {
72
72
}
73
73
}
74
74
75
- /// Formats an input prompt after selection.
75
+ /// Format an input prompt after selection.
76
76
#[ inline]
77
77
fn format_input_prompt_selection (
78
78
& self ,
@@ -83,14 +83,14 @@ pub trait Theme {
83
83
write ! ( f, "{}: {}" , prompt, sel)
84
84
}
85
85
86
- /// Formats a password prompt.
86
+ /// Format a password prompt.
87
87
#[ inline]
88
88
#[ cfg( feature = "password" ) ]
89
89
fn format_password_prompt ( & self , f : & mut dyn fmt:: Write , prompt : & str ) -> fmt:: Result {
90
90
self . format_input_prompt ( f, prompt, None )
91
91
}
92
92
93
- /// Formats a password prompt after selection.
93
+ /// Format a password prompt after selection.
94
94
#[ inline]
95
95
#[ cfg( feature = "password" ) ]
96
96
fn format_password_prompt_selection (
@@ -101,13 +101,13 @@ pub trait Theme {
101
101
self . format_input_prompt_selection ( f, prompt, "[hidden]" )
102
102
}
103
103
104
- /// Formats a select prompt.
104
+ /// Format a select prompt.
105
105
#[ inline]
106
106
fn format_select_prompt ( & self , f : & mut dyn fmt:: Write , prompt : & str ) -> fmt:: Result {
107
107
self . format_prompt ( f, prompt)
108
108
}
109
109
110
- /// Formats a select prompt after selection.
110
+ /// Format a select prompt after selection.
111
111
#[ inline]
112
112
fn format_select_prompt_selection (
113
113
& self ,
@@ -118,19 +118,19 @@ pub trait Theme {
118
118
self . format_input_prompt_selection ( f, prompt, sel)
119
119
}
120
120
121
- /// Formats a multi select prompt.
121
+ /// Format a multi select prompt.
122
122
#[ inline]
123
123
fn format_multi_select_prompt ( & self , f : & mut dyn fmt:: Write , prompt : & str ) -> fmt:: Result {
124
124
self . format_prompt ( f, prompt)
125
125
}
126
126
127
- /// Formats a sort prompt.
127
+ /// Format a sort prompt.
128
128
#[ inline]
129
129
fn format_sort_prompt ( & self , f : & mut dyn fmt:: Write , prompt : & str ) -> fmt:: Result {
130
130
self . format_prompt ( f, prompt)
131
131
}
132
132
133
- /// Formats a multi_select prompt after selection.
133
+ /// Format a multi_select prompt after selection.
134
134
fn format_multi_select_prompt_selection (
135
135
& self ,
136
136
f : & mut dyn fmt:: Write ,
@@ -144,7 +144,7 @@ pub trait Theme {
144
144
Ok ( ( ) )
145
145
}
146
146
147
- /// Formats a sort prompt after selection.
147
+ /// Format a sort prompt after selection.
148
148
#[ inline]
149
149
fn format_sort_prompt_selection (
150
150
& self ,
@@ -155,7 +155,7 @@ pub trait Theme {
155
155
self . format_multi_select_prompt_selection ( f, prompt, selections)
156
156
}
157
157
158
- /// Formats a select prompt item.
158
+ /// Format a select prompt item.
159
159
fn format_select_prompt_item (
160
160
& self ,
161
161
f : & mut dyn fmt:: Write ,
@@ -186,7 +186,7 @@ pub trait Theme {
186
186
)
187
187
}
188
188
189
- /// Formats a sort prompt item.
189
+ /// Format a sort prompt item.
190
190
fn format_sort_prompt_item (
191
191
& self ,
192
192
f : & mut dyn fmt:: Write ,
@@ -206,7 +206,7 @@ pub trait Theme {
206
206
)
207
207
}
208
208
209
- /// Formats a fuzzy select prompt.
209
+ /// Format a fuzzy select prompt.
210
210
#[ cfg( feature = "fuzzy-select" ) ]
211
211
fn format_fuzzy_select_prompt (
212
212
& self ,
0 commit comments