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 11use std:: {
22 cmp:: Ordering ,
3- fmt:: Debug ,
43 io, iter,
54 str:: FromStr ,
65 sync:: { Arc , Mutex } ,
@@ -281,7 +280,7 @@ where
281280impl < T > Input < ' _ , T >
282281where
283282 T : Clone + ToString + FromStr ,
284- <T as FromStr >:: Err : Debug + ToString ,
283+ <T as FromStr >:: Err : ToString ,
285284{
286285 /// Enables the user to enter a printable ascii sequence and returns the result.
287286 ///
@@ -313,11 +312,6 @@ where
313312 } ,
314313 ) ?;
315314
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-
321315 let mut chars: Vec < char > = Vec :: new ( ) ;
322316 let mut position = 0 ;
323317 #[ cfg( feature = "history" ) ]
@@ -629,13 +623,7 @@ where
629623 }
630624 }
631625 }
632- }
633626
634- impl < T > Input < ' _ , T >
635- where
636- T : Clone + ToString + FromStr ,
637- <T as FromStr >:: Err : ToString ,
638- {
639627 /// Enables user interaction and returns the result.
640628 ///
641629 /// Allows any characters as input, including e.g arrow keys.
You can’t perform that action at this time.
0 commit comments