Commit 1aad10c
authored
Remove dead Option layer from run_piped (#3634)
This is a clean-up PR: I noticed that the `run_piped` function has an
`Option` layer that is unnecessary:
- If the process launching fails, it returns an error.
- If it succeeds, it returns `Ok(Some(process))`
Thus, the `Option` layer is always `Some`. The main change is updating
the function signature from:
```rust
pub fn run_piped(verbosity: &impl Verbosity, mut cmd: Command) -> Result<Option<Child>>
```
to:
```rust
pub fn run_piped(verbosity: &impl Verbosity, mut cmd: Command) -> Result<Child>
```
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.1 parent 20c3d69 commit 1aad10c
3 files changed
+50
-53
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
312 | 289 | | |
313 | | - | |
314 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
315 | 293 | | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
320 | 301 | | |
321 | | - | |
322 | | - | |
323 | 302 | | |
324 | 303 | | |
325 | | - | |
| 304 | + | |
326 | 305 | | |
327 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
328 | 327 | | |
329 | 328 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
336 | 333 | | |
337 | 334 | | |
338 | 335 | | |
| |||
383 | 380 | | |
384 | 381 | | |
385 | 382 | | |
386 | | - | |
| 383 | + | |
387 | 384 | | |
388 | 385 | | |
389 | 386 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
0 commit comments