@@ -92,10 +92,10 @@ where
9292 } else {
9393 for v in actual. into_iter ( ) {
9494 if self . inner . matches ( v) . into ( ) {
95- return MatcherResult :: Matches ;
95+ return MatcherResult :: Match ;
9696 }
9797 }
98- MatcherResult :: DoesNotMatch
98+ MatcherResult :: NoMatch
9999 }
100100 }
101101
@@ -110,22 +110,22 @@ where
110110
111111 fn describe ( & self , matcher_result : MatcherResult ) -> String {
112112 match ( matcher_result, & self . count ) {
113- ( MatcherResult :: Matches , Some ( count) ) => format ! (
113+ ( MatcherResult :: Match , Some ( count) ) => format ! (
114114 "contains n elements which {}\n where n {}" ,
115- self . inner. describe( MatcherResult :: Matches ) ,
116- count. describe( MatcherResult :: Matches )
115+ self . inner. describe( MatcherResult :: Match ) ,
116+ count. describe( MatcherResult :: Match )
117117 ) ,
118- ( MatcherResult :: DoesNotMatch , Some ( count) ) => format ! (
118+ ( MatcherResult :: NoMatch , Some ( count) ) => format ! (
119119 "doesn't contain n elements which {}\n where n {}" ,
120- self . inner. describe( MatcherResult :: Matches ) ,
121- count. describe( MatcherResult :: Matches )
120+ self . inner. describe( MatcherResult :: Match ) ,
121+ count. describe( MatcherResult :: Match )
122122 ) ,
123- ( MatcherResult :: Matches , None ) => format ! (
123+ ( MatcherResult :: Match , None ) => format ! (
124124 "contains at least one element which {}" ,
125- self . inner. describe( MatcherResult :: Matches )
125+ self . inner. describe( MatcherResult :: Match )
126126 ) ,
127- ( MatcherResult :: DoesNotMatch , None ) => {
128- format ! ( "contains no element which {}" , self . inner. describe( MatcherResult :: Matches ) )
127+ ( MatcherResult :: NoMatch , None ) => {
128+ format ! ( "contains no element which {}" , self . inner. describe( MatcherResult :: Match ) )
129129 }
130130 }
131131 }
@@ -159,7 +159,7 @@ mod tests {
159159
160160 let result = matcher. matches ( & vec ! [ 1 ] ) ;
161161
162- verify_that ! ( result, eq( MatcherResult :: Matches ) )
162+ verify_that ! ( result, eq( MatcherResult :: Match ) )
163163 }
164164
165165 #[ test]
@@ -168,7 +168,7 @@ mod tests {
168168
169169 let result = matcher. matches ( & vec ! [ 1 ] ) ;
170170
171- verify_that ! ( result, eq( MatcherResult :: Matches ) )
171+ verify_that ! ( result, eq( MatcherResult :: Match ) )
172172 }
173173
174174 #[ test]
@@ -177,7 +177,7 @@ mod tests {
177177
178178 let result = matcher. matches ( & [ 0 , 1 ] ) ;
179179
180- verify_that ! ( result, eq( MatcherResult :: Matches ) )
180+ verify_that ! ( result, eq( MatcherResult :: Match ) )
181181 }
182182
183183 #[ test]
@@ -186,7 +186,7 @@ mod tests {
186186
187187 let result = matcher. matches ( & [ 0 ] ) ;
188188
189- verify_that ! ( result, eq( MatcherResult :: DoesNotMatch ) )
189+ verify_that ! ( result, eq( MatcherResult :: NoMatch ) )
190190 }
191191
192192 #[ test]
@@ -195,7 +195,7 @@ mod tests {
195195
196196 let result = matcher. matches ( & [ ] ) ;
197197
198- verify_that ! ( result, eq( MatcherResult :: DoesNotMatch ) )
198+ verify_that ! ( result, eq( MatcherResult :: NoMatch ) )
199199 }
200200
201201 #[ test]
@@ -204,7 +204,7 @@ mod tests {
204204
205205 let result = matcher. matches ( & [ 1 , 1 ] ) ;
206206
207- verify_that ! ( result, eq( MatcherResult :: Matches ) )
207+ verify_that ! ( result, eq( MatcherResult :: Match ) )
208208 }
209209
210210 #[ test]
@@ -213,7 +213,7 @@ mod tests {
213213
214214 let result = matcher. matches ( & [ 0 , 1 ] ) ;
215215
216- verify_that ! ( result, eq( MatcherResult :: DoesNotMatch ) )
216+ verify_that ! ( result, eq( MatcherResult :: NoMatch ) )
217217 }
218218
219219 #[ test]
@@ -222,15 +222,15 @@ mod tests {
222222
223223 let result = matcher. matches ( & [ 1 , 1 ] ) ;
224224
225- verify_that ! ( result, eq( MatcherResult :: DoesNotMatch ) )
225+ verify_that ! ( result, eq( MatcherResult :: NoMatch ) )
226226 }
227227
228228 #[ test]
229229 fn contains_formats_without_multiplicity_by_default ( ) -> Result < ( ) > {
230230 let matcher: ContainsMatcher < Vec < i32 > , _ > = contains ( eq ( 1 ) ) ;
231231
232232 verify_that ! (
233- Matcher :: describe( & matcher, MatcherResult :: Matches ) ,
233+ Matcher :: describe( & matcher, MatcherResult :: Match ) ,
234234 eq( "contains at least one element which is equal to 1" )
235235 )
236236 }
@@ -240,7 +240,7 @@ mod tests {
240240 let matcher: ContainsMatcher < Vec < i32 > , _ > = contains ( eq ( 1 ) ) . times ( eq ( 2 ) ) ;
241241
242242 verify_that ! (
243- Matcher :: describe( & matcher, MatcherResult :: Matches ) ,
243+ Matcher :: describe( & matcher, MatcherResult :: Match ) ,
244244 eq( "contains n elements which is equal to 1\n where n is equal to 2" )
245245 )
246246 }
0 commit comments