diff --git a/src/prompts/input.rs b/src/prompts/input.rs index 510aecf..209ff68 100644 --- a/src/prompts/input.rs +++ b/src/prompts/input.rs @@ -1,6 +1,5 @@ use std::{ cmp::Ordering, - fmt::Debug, io, iter, str::FromStr, sync::{Arc, Mutex}, @@ -281,7 +280,7 @@ where impl Input<'_, T> where T: Clone + ToString + FromStr, - ::Err: Debug + ToString, + ::Err: ToString, { /// Enables the user to enter a printable ascii sequence and returns the result. /// @@ -313,11 +312,6 @@ where }, )?; - // Read input by keystroke so that we can suppress ascii control characters - if !term.features().is_attended() { - return Ok("".to_owned().parse::().unwrap()); - } - let mut chars: Vec = Vec::new(); let mut position = 0; #[cfg(feature = "history")] @@ -629,13 +623,7 @@ where } } } -} -impl Input<'_, T> -where - T: Clone + ToString + FromStr, - ::Err: ToString, -{ /// Enables user interaction and returns the result. /// /// Allows any characters as input, including e.g arrow keys.