@@ -21,12 +21,7 @@ use unicode_segmentation::UnicodeSegmentation;
21
21
///
22
22
/// # Errors
23
23
/// Will return `Err` if the given program performs an illegal operation or an io error occurs. See [`Error`](./enum.Error.html).
24
- pub fn run_program_from_read < P , I , O > ( program : P , input : I , mut output : O ) -> Result < ( ) , Error >
25
- where
26
- P : Read ,
27
- I : Read ,
28
- O : Write ,
29
- {
24
+ pub fn run_program_from_read ( program : impl Read , input : impl Read , mut output : impl Write ) -> Result < ( ) , Error > {
30
25
let mut program = BufReader :: new ( program) ;
31
26
let mut input = BufReader :: new ( input) ;
32
27
@@ -225,11 +220,7 @@ where
225
220
///
226
221
/// # Errors
227
222
/// Will return `Err` if the given program performs an illegal operation or an io error occurs. See [`Error`](./enum.Error.html).
228
- pub fn run_program_str < I , O > ( program : & str , input : I , output : O ) -> Result < ( ) , Error >
229
- where
230
- I : Read ,
231
- O : Write ,
232
- {
223
+ pub fn run_program_str ( program : & str , input : impl Read , output : impl Write ) -> Result < ( ) , Error > {
233
224
let parsed = parse_program_str ( program) ;
234
225
run_program ( & parsed, input, output)
235
226
}
@@ -254,11 +245,7 @@ where
254
245
///
255
246
/// # Errors
256
247
/// Will return `Err` if the given program performs an illegal operation or an io error occurs. See [`Error`](./enum.Error.html).
257
- pub fn run_program < I , O > ( program : & [ Command < ' _ > ] , input : I , mut output : O ) -> Result < ( ) , Error >
258
- where
259
- I : Read ,
260
- O : Write ,
261
- {
248
+ pub fn run_program ( program : & [ Command < ' _ > ] , input : impl Read , mut output : impl Write ) -> Result < ( ) , Error > {
262
249
let mut input = BufReader :: new ( input) ;
263
250
let mut in_line = String :: new ( ) ;
264
251
0 commit comments