Skip to content

Commit 516ca25

Browse files
committed
Auto merge of #39881 - king6cong:sys, r=japaric
code format
2 parents ae23e65 + 7c8ca80 commit 516ca25

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/libcore/iter/iterator.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2164,16 +2164,16 @@ pub trait Iterator {
21642164
}
21652165
}
21662166

2167-
/// Select an element from an iterator based on the given projection
2167+
/// Select an element from an iterator based on the given "projection"
21682168
/// and "comparison" function.
21692169
///
21702170
/// This is an idiosyncratic helper to try to factor out the
21712171
/// commonalities of {max,min}{,_by}. In particular, this avoids
21722172
/// having to implement optimizations several times.
21732173
#[inline]
2174-
fn select_fold1<I,B, FProj, FCmp>(mut it: I,
2175-
mut f_proj: FProj,
2176-
mut f_cmp: FCmp) -> Option<(B, I::Item)>
2174+
fn select_fold1<I, B, FProj, FCmp>(mut it: I,
2175+
mut f_proj: FProj,
2176+
mut f_cmp: FCmp) -> Option<(B, I::Item)>
21772177
where I: Iterator,
21782178
FProj: FnMut(&I::Item) -> B,
21792179
FCmp: FnMut(&B, &I::Item, &B, &I::Item) -> bool
@@ -2186,7 +2186,7 @@ fn select_fold1<I,B, FProj, FCmp>(mut it: I,
21862186

21872187
for x in it {
21882188
let x_p = f_proj(&x);
2189-
if f_cmp(&sel_p, &sel, &x_p, &x) {
2189+
if f_cmp(&sel_p, &sel, &x_p, &x) {
21902190
sel = x;
21912191
sel_p = x_p;
21922192
}

0 commit comments

Comments
 (0)