Skip to content

Commit f5b70bd

Browse files
bjacotgcopybara-github
authored andcommitted
Reenable Wrap comments.
The big table of the crate level documentation was moved a while ago and will not get butchered anymore. Also trigger a repo wide reformat. The diagram in unordered_elements_are_matcher.rs was also slightly butchered, but adding horizontal line seems to protect it well enough. PiperOrigin-RevId: 548055975
1 parent b94cf17 commit f5b70bd

File tree

2 files changed

+25
-28
lines changed

2 files changed

+25
-28
lines changed

googletest/src/matchers/unordered_elements_are_matcher.rs

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@
9393
///
9494
/// The matcher proceeds in three stages:
9595
///
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.
9999
///
100100
/// 2. It then checks whether each matcher matches at least one corresponding
101101
/// element in the actual container and each element in the actual container
@@ -107,8 +107,7 @@
107107
/// actual elements is a 1-1 correspondence and fails if that is not the
108108
/// case. The failure message then shows the best matching it could find,
109109
/// 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.
112111
///
113112
/// [`IntoIterator`]: std::iter::IntoIterator
114113
/// [`Iterator`]: std::iter::Iterator
@@ -199,9 +198,9 @@ macro_rules! unordered_elements_are {
199198
///
200199
/// The matcher proceeds in three stages:
201200
///
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.
205204
///
206205
/// 2. It then checks whether each matcher matches at least one corresponding
207206
/// element in the actual container and fails if that is not the case. The
@@ -305,18 +304,18 @@ macro_rules! contains_each {
305304
///
306305
/// The matcher proceeds in three stages:
307306
///
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.
311310
///
312311
/// 2. It then checks whether each actual container element is matched by at
313312
/// least one matcher and fails if that is not the case. The failure message
314313
/// indicates which element had no corresponding matcher.
315314
///
316315
/// 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.
320319
///
321320
/// [`IntoIterator`]: std::iter::IntoIterator
322321
/// [`Iterator`]: std::iter::Iterator
@@ -727,17 +726,17 @@ pub mod internal {
727726
// expected_match[r] == None or actual_match[expected_match[e].unwrap()] ==
728727
// Some(e)
729728
//
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 ] |
741740
//
742741
// See Also:
743742
// [1] Cormen, et al (2001). "Section 26.2: The Ford-Fulkerson method".

rustfmt.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ use_small_heuristics = "Max"
2222

2323
newline_style = "Unix"
2424

25-
# This is required to keep the autoformatter from clobbering the markdown table
26-
# in the crate-level documentation in googletest/src/lib.rs.
27-
wrap_comments = false
25+
wrap_comments = true
2826

2927
format_generated_files = false

0 commit comments

Comments
 (0)