@@ -71,17 +71,17 @@ where
71
71
fn describe ( & self , matcher_result : MatcherResult ) -> String {
72
72
match matcher_result {
73
73
MatcherResult :: Matches => {
74
- format ! ( "has size , which {}" , self . expected. describe( MatcherResult :: Matches ) )
74
+ format ! ( "has length , which {}" , self . expected. describe( MatcherResult :: Matches ) )
75
75
}
76
76
MatcherResult :: DoesNotMatch => {
77
- format ! ( "has size , which {}" , self . expected. describe( MatcherResult :: DoesNotMatch ) )
77
+ format ! ( "has length , which {}" , self . expected. describe( MatcherResult :: DoesNotMatch ) )
78
78
}
79
79
}
80
80
}
81
81
82
82
fn explain_match ( & self , actual : & T ) -> String {
83
83
let actual_size = count_elements ( actual) ;
84
- format ! ( "which has size {}, {}" , actual_size, self . expected. explain_match( & actual_size) )
84
+ format ! ( "which has length {}, {}" , actual_size, self . expected. explain_match( & actual_size) )
85
85
}
86
86
}
87
87
@@ -190,7 +190,7 @@ mod tests {
190
190
}
191
191
verify_that ! (
192
192
len( TestMatcher ( Default :: default ( ) ) ) . explain_match( & [ 1 , 2 , 3 ] ) ,
193
- displays_as( eq( "which has size 3, called explain_match" ) )
193
+ displays_as( eq( "which has length 3, called explain_match" ) )
194
194
)
195
195
}
196
196
@@ -202,9 +202,9 @@ mod tests {
202
202
err( displays_as( contains_substring( indoc!(
203
203
"
204
204
Value of: vec![1, 2, 3, 4]
205
- Expected: has size , which is equal to 3
205
+ Expected: has length , which is equal to 3
206
206
Actual: [1, 2, 3, 4],
207
- which has size 4, which isn't equal to 3"
207
+ which has length 4, which isn't equal to 3"
208
208
) ) ) )
209
209
)
210
210
}
0 commit comments