Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions src/prompts/input.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::{
cmp::Ordering,
fmt::Debug,
io, iter,
str::FromStr,
sync::{Arc, Mutex},
Expand Down Expand Up @@ -281,7 +280,7 @@ where
impl<T> Input<'_, T>
where
T: Clone + ToString + FromStr,
<T as FromStr>::Err: Debug + ToString,
<T as FromStr>::Err: ToString,
{
/// Enables the user to enter a printable ascii sequence and returns the result.
///
Expand Down Expand Up @@ -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::<T>().unwrap());
}

let mut chars: Vec<char> = Vec::new();
let mut position = 0;
#[cfg(feature = "history")]
Expand Down Expand Up @@ -629,13 +623,7 @@ where
}
}
}
}

impl<T> Input<'_, T>
where
T: Clone + ToString + FromStr,
<T as FromStr>::Err: ToString,
{
/// Enables user interaction and returns the result.
///
/// Allows any characters as input, including e.g arrow keys.
Expand Down