Skip to content

Commit 72c6119

Browse files
authored
Apply suggestions from code review
1 parent 8834d86 commit 72c6119

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/prompts/input.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ use console::{Key, Term};
1313

1414
/// Renders an input prompt.
1515
///
16-
/// Format of rendered prompt is `prompt` [`default`]: `initial_text`
17-
///
1816
/// ## Example usage
1917
///
2018
/// ```rust,no_run
19+
/// use dialoguer::Input;
20+
///
2121
/// let input : String = Input::new()
2222
/// .with_prompt("Tea or coffee?")
2323
/// .with_initial_text("Yes")
2424
/// .default("No".into())
25-
/// .interact()?;
25+
/// .interact_text()?;
2626
/// ```
2727
/// It can also be used with turbofish notation:
2828
///
2929
/// ```rust,no_run
3030
/// let input = Input::<String>::new()
31-
/// .interact()?;
31+
/// .interact_text()?;
3232
/// ```
3333
pub struct Input<'a, T> {
3434
prompt: String,
@@ -79,7 +79,7 @@ where
7979
self
8080
}
8181

82-
/// Sets initial text that user can accept of erease.
82+
/// Sets initial text that user can accept or erase.
8383
pub fn with_initial_text<S: Into<String>>(&mut self, val: S) -> &mut Input<'a, T> {
8484
self.initial_text = Some(val.into());
8585
self

src/prompts/multi_select.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use console::{Key, Term};
1212
///
1313
/// let items = vec![("Option 1", true), ("Option 2", false)];
1414
/// let chosen : Vec<usize> = MultiSelect::new()
15-
/// .items_checked(&items)
15+
/// .items(&items)
1616
/// .interact()?;
1717
/// ```
1818
pub struct MultiSelect<'a> {

src/prompts/sort.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ use console::{Key, Term};
1010
///
1111
/// ## Example usage
1212
/// ```rust,no_run
13+
/// use dialoguer::Sort;
14+
///
1315
/// let items_to_order = vec!["Item 1", "Item 2", "Item 3"];
1416
/// let ordered = Sort::new()
1517
/// .with_prompt("Order the items")

0 commit comments

Comments
 (0)