@@ -107,38 +107,38 @@ impl CompletedProcess {
107107
108108 /// Checks that trimmed `stdout` matches trimmed `content`.
109109 #[ 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 {
111111 assert_eq ! ( self . stdout_utf8( ) . trim( ) , content. as_ref( ) . trim( ) ) ;
112112 self
113113 }
114114
115115 #[ 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 {
117117 assert_not_contains ( & self . stdout_utf8 ( ) , needle. as_ref ( ) ) ;
118118 self
119119 }
120120
121121 /// Checks that trimmed `stderr` matches trimmed `content`.
122122 #[ 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 {
124124 assert_eq ! ( self . stderr_utf8( ) . trim( ) , content. as_ref( ) . trim( ) ) ;
125125 self
126126 }
127127
128128 #[ 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 {
130130 assert ! ( self . stderr_utf8( ) . contains( needle. as_ref( ) ) ) ;
131131 self
132132 }
133133
134134 #[ 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 {
136136 assert_not_contains ( & self . stdout_utf8 ( ) , needle. as_ref ( ) ) ;
137137 self
138138 }
139139
140140 #[ track_caller]
141- pub fn assert_exit_code ( self , code : i32 ) -> Self {
141+ pub fn assert_exit_code ( & self , code : i32 ) -> & Self {
142142 assert ! ( self . output. status. code( ) == Some ( code) ) ;
143143 self
144144 }
0 commit comments