File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change 1
1
use std:: {
2
2
cmp:: Ordering ,
3
- fmt:: Debug ,
4
3
io, iter,
5
4
str:: FromStr ,
6
5
sync:: { Arc , Mutex } ,
@@ -281,7 +280,7 @@ where
281
280
impl < T > Input < ' _ , T >
282
281
where
283
282
T : Clone + ToString + FromStr ,
284
- <T as FromStr >:: Err : Debug + ToString ,
283
+ <T as FromStr >:: Err : ToString ,
285
284
{
286
285
/// Enables the user to enter a printable ascii sequence and returns the result.
287
286
///
@@ -313,11 +312,6 @@ where
313
312
} ,
314
313
) ?;
315
314
316
- // Read input by keystroke so that we can suppress ascii control characters
317
- if !term. features ( ) . is_attended ( ) {
318
- return Ok ( "" . to_owned ( ) . parse :: < T > ( ) . unwrap ( ) ) ;
319
- }
320
-
321
315
let mut chars: Vec < char > = Vec :: new ( ) ;
322
316
let mut position = 0 ;
323
317
#[ cfg( feature = "history" ) ]
@@ -629,13 +623,7 @@ where
629
623
}
630
624
}
631
625
}
632
- }
633
626
634
- impl < T > Input < ' _ , T >
635
- where
636
- T : Clone + ToString + FromStr ,
637
- <T as FromStr >:: Err : ToString ,
638
- {
639
627
/// Enables user interaction and returns the result.
640
628
///
641
629
/// Allows any characters as input, including e.g arrow keys.
You can’t perform that action at this time.
0 commit comments