|
93 | 93 | ///
|
94 | 94 | /// The matcher proceeds in three stages:
|
95 | 95 | ///
|
96 |
| -/// 1. It first checks whether the actual value is of the right size to |
97 |
| -/// possibly be matched by each of the given matchers. If not, then it |
98 |
| -/// immediately fails explaining that the size is incorrect. |
| 96 | +/// 1. It first checks whether the actual value is of the right size to possibly |
| 97 | +/// be matched by each of the given matchers. If not, then it immediately |
| 98 | +/// fails explaining that the size is incorrect. |
99 | 99 | ///
|
100 | 100 | /// 2. It then checks whether each matcher matches at least one corresponding
|
101 | 101 | /// element in the actual container and each element in the actual container
|
|
107 | 107 | /// actual elements is a 1-1 correspondence and fails if that is not the
|
108 | 108 | /// case. The failure message then shows the best matching it could find,
|
109 | 109 | /// including which matchers did not have corresponding unique elements in
|
110 |
| -/// the container and which container elements had no corresponding |
111 |
| -/// matchers. |
| 110 | +/// the container and which container elements had no corresponding matchers. |
112 | 111 | ///
|
113 | 112 | /// [`IntoIterator`]: std::iter::IntoIterator
|
114 | 113 | /// [`Iterator`]: std::iter::Iterator
|
@@ -199,9 +198,9 @@ macro_rules! unordered_elements_are {
|
199 | 198 | ///
|
200 | 199 | /// The matcher proceeds in three stages:
|
201 | 200 | ///
|
202 |
| -/// 1. It first checks whether the actual value is large enough to |
203 |
| -/// possibly be matched by each of the given matchers. If not, then it |
204 |
| -/// immediately fails explaining that the size is too small. |
| 201 | +/// 1. It first checks whether the actual value is large enough to possibly be |
| 202 | +/// matched by each of the given matchers. If not, then it immediately fails |
| 203 | +/// explaining that the size is too small. |
205 | 204 | ///
|
206 | 205 | /// 2. It then checks whether each matcher matches at least one corresponding
|
207 | 206 | /// element in the actual container and fails if that is not the case. The
|
@@ -305,18 +304,18 @@ macro_rules! contains_each {
|
305 | 304 | ///
|
306 | 305 | /// The matcher proceeds in three stages:
|
307 | 306 | ///
|
308 |
| -/// 1. It first checks whether the actual value is too large to |
309 |
| -/// possibly be matched by each of the given matchers. If so, it |
310 |
| -/// immediately fails explaining that the size is too large. |
| 307 | +/// 1. It first checks whether the actual value is too large to possibly be |
| 308 | +/// matched by each of the given matchers. If so, it immediately fails |
| 309 | +/// explaining that the size is too large. |
311 | 310 | ///
|
312 | 311 | /// 2. It then checks whether each actual container element is matched by at
|
313 | 312 | /// least one matcher and fails if that is not the case. The failure message
|
314 | 313 | /// indicates which element had no corresponding matcher.
|
315 | 314 | ///
|
316 | 315 | /// 3. Finally, it checks whether the mapping of elements to corresponding
|
317 |
| -/// matchers is 1-1 and fails if that is not the case. The failure |
318 |
| -/// message then shows the best matching it could find, including which |
319 |
| -/// container elements did not have corresponding matchers. |
| 316 | +/// matchers is 1-1 and fails if that is not the case. The failure message |
| 317 | +/// then shows the best matching it could find, including which container |
| 318 | +/// elements did not have corresponding matchers. |
320 | 319 | ///
|
321 | 320 | /// [`IntoIterator`]: std::iter::IntoIterator
|
322 | 321 | /// [`Iterator`]: std::iter::Iterator
|
@@ -727,17 +726,17 @@ pub mod internal {
|
727 | 726 | // expected_match[r] == None or actual_match[expected_match[e].unwrap()] ==
|
728 | 727 | // Some(e)
|
729 | 728 | //
|
730 |
| - // . [ source ] . |
731 |
| - // . ||| . |
732 |
| - // . ||| . |
733 |
| - // . ||\-> actual_match[0]=Some(1) -\ expected_match[0]=None ---\ . |
734 |
| - // . || | | . |
735 |
| - // . |\--> actual_match[1]=None \-> expected_match[1]=Some(0) --\| . |
736 |
| - // . | || . |
737 |
| - // . \---> actual_match[2]=Some(2) --> expected_match[2]=Some(2) -\|| . |
738 |
| - // . ||| . |
739 |
| - // . elements matchers vvv . |
740 |
| - // . [ sink ] . |
| 729 | + // | [ source ] | |
| 730 | + // | ||| | |
| 731 | + // | ||| | |
| 732 | + // | ||\-> actual_match[0]=Some(1) -\ expected_match[0]=None ---\ | |
| 733 | + // | || | | | |
| 734 | + // | |\--> actual_match[1]=None \-> expected_match[1]=Some(0) --\| | |
| 735 | + // | | || | |
| 736 | + // | \---> actual_match[2]=Some(2) --> expected_match[2]=Some(2) -\|| | |
| 737 | + // | ||| | |
| 738 | + // | elements matchers vvv | |
| 739 | + // | [ sink ] | |
741 | 740 | //
|
742 | 741 | // See Also:
|
743 | 742 | // [1] Cormen, et al (2001). "Section 26.2: The Ford-Fulkerson method".
|
|
0 commit comments