File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed
src/tools/run-make-support/src Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,10 @@ impl Command {
3636 Self { cmd : StdCommand :: new ( program) , stdin : None , drop_bomb : DropBomb :: arm ( program) }
3737 }
3838
39- pub fn set_stdin ( & mut self , stdin : Box < [ u8 ] > ) {
40- self . stdin = Some ( stdin) ;
39+ /// Specify a stdin input
40+ pub fn stdin < I : AsRef < [ u8 ] > > ( & mut self , input : I ) -> & mut Self {
41+ self . stdin = Some ( input. as_ref ( ) . to_vec ( ) . into_boxed_slice ( ) ) ;
42+ self
4143 }
4244
4345 /// Specify an environment variable.
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ impl LlvmFilecheck {
171171
172172 /// Pipe a read file into standard input containing patterns that will be matched against the .patterns(path) call.
173173 pub fn stdin < I : AsRef < [ u8 ] > > ( & mut self , input : I ) -> & mut Self {
174- self . cmd . set_stdin ( input. as_ref ( ) . to_vec ( ) . into_boxed_slice ( ) ) ;
174+ self . cmd . stdin ( input) ;
175175 self
176176 }
177177
Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ impl Rustc {
244244
245245 /// Specify a stdin input
246246 pub fn stdin < I : AsRef < [ u8 ] > > ( & mut self , input : I ) -> & mut Self {
247- self . cmd . set_stdin ( input. as_ref ( ) . to_vec ( ) . into_boxed_slice ( ) ) ;
247+ self . cmd . stdin ( input) ;
248248 self
249249 }
250250
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ impl Rustdoc {
9292
9393 /// Specify a stdin input
9494 pub fn stdin < I : AsRef < [ u8 ] > > ( & mut self , input : I ) -> & mut Self {
95- self . cmd . set_stdin ( input. as_ref ( ) . to_vec ( ) . into_boxed_slice ( ) ) ;
95+ self . cmd . stdin ( input) ;
9696 self
9797 }
9898
You can’t perform that action at this time.
0 commit comments