Method
optional_input
(&self, prompt: &str, label: &str)
Source from the content-addressed store, hash-verified
| 23 | } |
| 24 | |
| 25 | pub fn optional_input(&self, prompt: &str, label: &str) -> Result<String> { |
| 26 | let input = Text::new(prompt) |
| 27 | .with_render_config(self.config) |
| 28 | .with_help_message(format!("{label}. Press Enter to skip").as_str()) |
| 29 | .prompt()?; |
| 30 | Ok(input) |
| 31 | } |
| 32 | |
| 33 | pub fn required_input(&self, prompt: &str, label: &str) -> Result<String> { |
| 34 | let input = Text::new(prompt) |
Tested by
no test coverage detected