@@ -107,38 +107,38 @@ impl CompletedProcess {
107
107
108
108
/// Checks that trimmed `stdout` matches trimmed `content`.
109
109
#[ track_caller]
110
- pub fn assert_stdout_equals < S : AsRef < str > > ( self , content : S ) -> Self {
110
+ pub fn assert_stdout_equals < S : AsRef < str > > ( & self , content : S ) -> & Self {
111
111
assert_eq ! ( self . stdout_utf8( ) . trim( ) , content. as_ref( ) . trim( ) ) ;
112
112
self
113
113
}
114
114
115
115
#[ track_caller]
116
- pub fn assert_stdout_not_contains < S : AsRef < str > > ( self , needle : S ) -> Self {
116
+ pub fn assert_stdout_not_contains < S : AsRef < str > > ( & self , needle : S ) -> & Self {
117
117
assert_not_contains ( & self . stdout_utf8 ( ) , needle. as_ref ( ) ) ;
118
118
self
119
119
}
120
120
121
121
/// Checks that trimmed `stderr` matches trimmed `content`.
122
122
#[ track_caller]
123
- pub fn assert_stderr_equals < S : AsRef < str > > ( self , content : S ) -> Self {
123
+ pub fn assert_stderr_equals < S : AsRef < str > > ( & self , content : S ) -> & Self {
124
124
assert_eq ! ( self . stderr_utf8( ) . trim( ) , content. as_ref( ) . trim( ) ) ;
125
125
self
126
126
}
127
127
128
128
#[ track_caller]
129
- pub fn assert_stderr_contains < S : AsRef < str > > ( self , needle : S ) -> Self {
129
+ pub fn assert_stderr_contains < S : AsRef < str > > ( & self , needle : S ) -> & Self {
130
130
assert ! ( self . stderr_utf8( ) . contains( needle. as_ref( ) ) ) ;
131
131
self
132
132
}
133
133
134
134
#[ track_caller]
135
- pub fn assert_stderr_not_contains < S : AsRef < str > > ( self , needle : S ) -> Self {
135
+ pub fn assert_stderr_not_contains < S : AsRef < str > > ( & self , needle : S ) -> & Self {
136
136
assert_not_contains ( & self . stdout_utf8 ( ) , needle. as_ref ( ) ) ;
137
137
self
138
138
}
139
139
140
140
#[ track_caller]
141
- pub fn assert_exit_code ( self , code : i32 ) -> Self {
141
+ pub fn assert_exit_code ( & self , code : i32 ) -> & Self {
142
142
assert ! ( self . output. status. code( ) == Some ( code) ) ;
143
143
self
144
144
}
0 commit comments