console-rs / dialoguer

Rust utility library for nice command line prompts and similar things
MIT License
1.31k stars 143 forks source link

Remove dead code and 'Debug' trait bound on Input's 'interact_text*' methods #280

Closed tbergerd closed 1 year ago

tbergerd commented 1 year ago

Extracted from #278 as requested. The "term.features().is_attended()" check can never be reached because "term.is_term()" is checked at the beginning of the method (iiuc the checks are strictly equivalent).

Additionnally, the 'unwrap' call in the dead code forced a 'Debug' trait bound on the ::Err associated type.

Therefore i removed both the dead code and the now unnecessary trait bound.