Mercurial > crates > nonstick
comparison src/libpam/question.rs @ 79:2128123b9406
Format (oops!) and make some fun and/or stupid conversions available.
| author | Paul Fisher <paul@pfish.zone> |
|---|---|
| date | Sun, 08 Jun 2025 04:21:58 -0400 |
| parents | 002adfb98c5c |
| children | 5aa1a010f1e8 |
comparison
equal
deleted
inserted
replaced
| 78:002adfb98c5c | 79:2128123b9406 |
|---|---|
| 315 Message::MaskedPrompt(p) => alloc(Style::PromptEchoOff, p.question()), | 315 Message::MaskedPrompt(p) => alloc(Style::PromptEchoOff, p.question()), |
| 316 Message::Prompt(p) => alloc(Style::PromptEchoOn, p.question()), | 316 Message::Prompt(p) => alloc(Style::PromptEchoOn, p.question()), |
| 317 Message::RadioPrompt(p) => alloc(Style::RadioType, p.question()), | 317 Message::RadioPrompt(p) => alloc(Style::RadioType, p.question()), |
| 318 Message::Error(p) => alloc(Style::ErrorMsg, p.question()), | 318 Message::Error(p) => alloc(Style::ErrorMsg, p.question()), |
| 319 Message::Info(p) => alloc(Style::TextInfo, p.question()), | 319 Message::Info(p) => alloc(Style::TextInfo, p.question()), |
| 320 Message::BinaryPrompt(p) => { | 320 Message::BinaryPrompt(p) => Ok(( |
| 321 let q = p.question(); | 321 Style::BinaryPrompt, |
| 322 Ok(( | 322 CBinaryData::alloc(p.question())?.cast(), |
| 323 Style::BinaryPrompt, | 323 )), |
| 324 CBinaryData::alloc(q)?.cast(), | |
| 325 )) | |
| 326 } | |
| 327 } | 324 } |
| 328 } | 325 } |
| 329 | 326 |
| 330 #[cfg(test)] | 327 #[cfg(test)] |
| 331 mod tests { | 328 mod tests { |
