upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/lib/cli_interactor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/cli_interactor.rs')
-rw-r--r--src/lib/cli_interactor.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/cli_interactor.rs b/src/lib/cli_interactor.rs
index 2ceb088..50a0f0c 100644
--- a/src/lib/cli_interactor.rs
+++ b/src/lib/cli_interactor.rs
@@ -178,7 +178,6 @@ impl Default for PromptChoiceParms {
178impl PromptChoiceParms { 178impl PromptChoiceParms {
179 pub fn with_prompt<S: Into<String>>(mut self, prompt: S) -> Self { 179 pub fn with_prompt<S: Into<String>>(mut self, prompt: S) -> Self {
180 self.prompt = prompt.into(); 180 self.prompt = prompt.into();
181 self.report = true;
182 self 181 self
183 } 182 }
184 183
@@ -198,7 +197,6 @@ impl PromptChoiceParms {
198 } 197 }
199} 198}
200 199
201#[derive(Default)]
202pub struct PromptMultiChoiceParms { 200pub struct PromptMultiChoiceParms {
203 pub prompt: String, 201 pub prompt: String,
204 pub choices: Vec<String>, 202 pub choices: Vec<String>,
@@ -206,10 +204,20 @@ pub struct PromptMultiChoiceParms {
206 pub report: bool, 204 pub report: bool,
207} 205}
208 206
207impl Default for PromptMultiChoiceParms {
208 fn default() -> Self {
209 Self {
210 prompt: String::new(),
211 choices: vec![],
212 defaults: None,
213 report: true,
214 }
215 }
216}
217
209impl PromptMultiChoiceParms { 218impl PromptMultiChoiceParms {
210 pub fn with_prompt<S: Into<String>>(mut self, prompt: S) -> Self { 219 pub fn with_prompt<S: Into<String>>(mut self, prompt: S) -> Self {
211 self.prompt = prompt.into(); 220 self.prompt = prompt.into();
212 self.report = true;
213 self 221 self
214 } 222 }
215 223