Skip to content

Commit 7426264

Browse files
committed
doc: Reword some doc comments in select.rs.
The comment on max_length was simply outdated.
1 parent 86ebe75 commit 7426264

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/prompts/select.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,17 @@ impl Select<'_> {
6868

6969
/// Set the initial selected element when the selection menu is rendered.
7070
///
71-
/// Element is indicated by the index at which it appears in `item` method invocation or `items` slice.
71+
/// The default element is indicated by the index at which it appears in the `item` method invocation or the `items` slice.
7272
pub fn default(&mut self, val: usize) -> &mut Self {
7373
self.default = val;
7474
self
7575
}
7676

77-
/// Sets an optional max length for a page.
78-
///
79-
/// Max length is disabled by None
77+
/// Set an optional max length for a page.
8078
pub fn max_length(&mut self, val: usize) -> &mut Self {
8179
// Paging subtracts two from the capacity, paging does this to
8280
// make an offset for the page indicator. So to make sure that
83-
// we can show the intended amount of items we need to add two
81+
// we can show the intended amount of items, we need to add two
8482
// to our value.
8583
self.max_length = Some(val + 2);
8684
self
@@ -168,7 +166,7 @@ impl Select<'_> {
168166
/// The user can select the items with the 'Space' bar or 'Enter' and the index of selected item will be returned.
169167
/// The dialog is rendered on stderr.
170168
/// Result contains `index` if user selected one of items using 'Enter'.
171-
/// This unlike [`interact_opt`](Self::interact_opt) does not allow to quit with 'Esc' or 'q'.
169+
/// Unlike [`interact_opt`](Self::interact_opt), this does not allow to quit with 'Esc' or 'q'.
172170
#[inline]
173171
pub fn interact(&self) -> io::Result<usize> {
174172
self.interact_on(&Term::stderr())

0 commit comments

Comments
 (0)