File tree 1 file changed +18
-0
lines changed
src/tools/run-make-support/src
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -222,6 +222,12 @@ pub struct CompletedProcess {
222
222
}
223
223
224
224
impl CompletedProcess {
225
+ #[ must_use]
226
+ #[ track_caller]
227
+ pub fn stdout ( & self ) -> Vec < u8 > {
228
+ self . output . stdout . clone ( )
229
+ }
230
+
225
231
#[ must_use]
226
232
#[ track_caller]
227
233
pub fn stdout_utf8 ( & self ) -> String {
@@ -234,12 +240,24 @@ impl CompletedProcess {
234
240
String :: from_utf8_lossy ( & self . output . stdout . clone ( ) ) . to_string ( )
235
241
}
236
242
243
+ #[ must_use]
244
+ #[ track_caller]
245
+ pub fn stderr ( & self ) -> Vec < u8 > {
246
+ self . output . stderr . clone ( )
247
+ }
248
+
237
249
#[ must_use]
238
250
#[ track_caller]
239
251
pub fn stderr_utf8 ( & self ) -> String {
240
252
String :: from_utf8 ( self . output . stderr . clone ( ) ) . expect ( "stderr is not valid UTF-8" )
241
253
}
242
254
255
+ #[ must_use]
256
+ #[ track_caller]
257
+ pub fn invalid_stderr_utf8 ( & self ) -> String {
258
+ String :: from_utf8_lossy ( & self . output . stderr . clone ( ) ) . to_string ( )
259
+ }
260
+
243
261
#[ must_use]
244
262
pub fn status ( & self ) -> ExitStatus {
245
263
self . output . status
You can’t perform that action at this time.
0 commit comments