Skip to content

Commit b86fc93

Browse files
committed
Add parentheses around expression arguments to ..
This makes it easier for humans to parse, and improves the result of potential future automatic formatting.
1 parent 9a650bc commit b86fc93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/iter/traits/iterator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ pub trait Iterator {
807807
/// might be preferable to keep a functional style with longer iterators:
808808
///
809809
/// ```
810-
/// (0..5).flat_map(|x| x * 100 .. x * 110)
810+
/// (0..5).flat_map(|x| (x * 100)..(x * 110))
811811
/// .enumerate()
812812
/// .filter(|&(i, x)| (i + x) % 3 == 0)
813813
/// .for_each(|(i, x)| println!("{i}:{x}"));

0 commit comments

Comments
 (0)