]> git.lizzy.rs Git - rust.git/commitdiff
code format
authorking6cong <king6cong@gmail.com>
Sat, 15 Apr 2017 03:43:35 +0000 (11:43 +0800)
committerking6cong <king6cong@gmail.com>
Sat, 15 Apr 2017 03:43:35 +0000 (11:43 +0800)
src/libcore/iter/iterator.rs

index 8bf641e37fe467c2120defd6b1a90afc79b0674c..3ad91ef15ea7bfa8ba08e3e00398cc8edf1c0cf3 100644 (file)
@@ -2164,16 +2164,16 @@ fn ge<I>(mut self, other: I) -> bool where
     }
 }
 
-/// Select an element from an iterator based on the given projection
+/// Select an element from an iterator based on the given "projection"
 /// and "comparison" function.
 ///
 /// This is an idiosyncratic helper to try to factor out the
 /// commonalities of {max,min}{,_by}. In particular, this avoids
 /// having to implement optimizations several times.
 #[inline]
-fn select_fold1<I,B, FProj, FCmp>(mut it: I,
-                                  mut f_proj: FProj,
-                                  mut f_cmp: FCmp) -> Option<(B, I::Item)>
+fn select_fold1<I, B, FProj, FCmp>(mut it: I,
+                                   mut f_proj: FProj,
+                                   mut f_cmp: FCmp) -> Option<(B, I::Item)>
     where I: Iterator,
           FProj: FnMut(&I::Item) -> B,
           FCmp: FnMut(&B, &I::Item, &B, &I::Item) -> bool
@@ -2186,7 +2186,7 @@ fn select_fold1<I,B, FProj, FCmp>(mut it: I,
 
         for x in it {
             let x_p = f_proj(&x);
-            if f_cmp(&sel_p,  &sel, &x_p, &x) {
+            if f_cmp(&sel_p, &sel, &x_p, &x) {
                 sel = x;
                 sel_p = x_p;
             }