@@ -126,11 +126,7 @@ impl<'s> Command<'s> {
126
126
///
127
127
/// To pass multiple arguments see [`args`](Command::args).
128
128
pub fn arg < S : AsRef < str > > ( & mut self , arg : S ) -> & mut Self {
129
- fn inner < ' cmd , ' s > ( this : & ' cmd mut Command < ' s > , arg : & str ) -> & ' cmd mut Command < ' s > {
130
- this. raw_arg ( & * shell_escape:: unix:: escape ( Cow :: Borrowed ( arg) ) )
131
- }
132
-
133
- inner ( self , arg. as_ref ( ) )
129
+ self . raw_arg ( & * shell_escape:: unix:: escape ( Cow :: Borrowed ( arg. as_ref ( ) ) ) )
134
130
}
135
131
136
132
/// Adds an argument to pass to the remote program.
@@ -142,14 +138,10 @@ impl<'s> Command<'s> {
142
138
///
143
139
/// To pass multiple unescaped arguments see [`raw_args`](Command::raw_args).
144
140
pub fn raw_arg < S : AsRef < OsStr > > ( & mut self , arg : S ) -> & mut Self {
145
- fn inner < ' cmd , ' s > ( this : & ' cmd mut Command < ' s > , arg : & OsStr ) -> & ' cmd mut Command < ' s > {
146
- delegate ! ( & mut this. imp, imp, {
147
- imp. raw_arg( arg) ;
148
- } ) ;
149
- this
150
- }
151
-
152
- inner ( self , arg. as_ref ( ) )
141
+ delegate ! ( & mut self . imp, imp, {
142
+ imp. raw_arg( arg. as_ref( ) ) ;
143
+ } ) ;
144
+ self
153
145
}
154
146
155
147
/// Adds multiple arguments to pass to the remote program.
@@ -197,15 +189,11 @@ impl<'s> Command<'s> {
197
189
/// [`inherit`]: struct.Stdio.html#method.inherit
198
190
/// [`null`]: struct.Stdio.html#method.null
199
191
pub fn stdin < T : Into < Stdio > > ( & mut self , cfg : T ) -> & mut Self {
200
- fn inner < ' cmd , ' s > ( this : & ' cmd mut Command < ' s > , cfg : Stdio ) -> & ' cmd mut Command < ' s > {
201
- delegate ! ( & mut this. imp, imp, {
202
- imp. stdin( cfg) ;
203
- } ) ;
204
- this. stdin_set = true ;
205
- this
206
- }
207
-
208
- inner ( self , cfg. into ( ) )
192
+ delegate ! ( & mut self . imp, imp, {
193
+ imp. stdin( cfg. into( ) ) ;
194
+ } ) ;
195
+ self . stdin_set = true ;
196
+ self
209
197
}
210
198
211
199
/// Configuration for the remote process's standard output (stdout) handle.
@@ -216,15 +204,11 @@ impl<'s> Command<'s> {
216
204
/// [`inherit`]: struct.Stdio.html#method.inherit
217
205
/// [`piped`]: struct.Stdio.html#method.piped
218
206
pub fn stdout < T : Into < Stdio > > ( & mut self , cfg : T ) -> & mut Self {
219
- fn inner < ' cmd , ' s > ( this : & ' cmd mut Command < ' s > , cfg : Stdio ) -> & ' cmd mut Command < ' s > {
220
- delegate ! ( & mut this. imp, imp, {
221
- imp. stdout( cfg) ;
222
- } ) ;
223
- this. stdout_set = true ;
224
- this
225
- }
226
-
227
- inner ( self , cfg. into ( ) )
207
+ delegate ! ( & mut self . imp, imp, {
208
+ imp. stdout( cfg. into( ) ) ;
209
+ } ) ;
210
+ self . stdout_set = true ;
211
+ self
228
212
}
229
213
230
214
/// Configuration for the remote process's standard error (stderr) handle.
@@ -235,15 +219,11 @@ impl<'s> Command<'s> {
235
219
/// [`inherit`]: struct.Stdio.html#method.inherit
236
220
/// [`piped`]: struct.Stdio.html#method.piped
237
221
pub fn stderr < T : Into < Stdio > > ( & mut self , cfg : T ) -> & mut Self {
238
- fn inner < ' cmd , ' s > ( this : & ' cmd mut Command < ' s > , cfg : Stdio ) -> & ' cmd mut Command < ' s > {
239
- delegate ! ( & mut this. imp, imp, {
240
- imp. stderr( cfg) ;
241
- } ) ;
242
- this. stderr_set = true ;
243
- this
244
- }
245
-
246
- inner ( self , cfg. into ( ) )
222
+ delegate ! ( & mut self . imp, imp, {
223
+ imp. stderr( cfg. into( ) ) ;
224
+ } ) ;
225
+ self . stderr_set = true ;
226
+ self
247
227
}
248
228
249
229
async fn spawn_impl ( & mut self ) -> Result < RemoteChild < ' s > , Error > {
0 commit comments