about summary refs log tree commit diff
path: root/src/types.rs
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2015-07-16 14:23:48 +1200
committerNick Cameron <ncameron@mozilla.com>2015-07-16 14:23:48 +1200
commitf2bcee9d873adaf31dfdc5aee06ff89c0373e2b3 (patch)
treedfebd76b6268f16d4d445e0757397a097a884d30 /src/types.rs
parent9ab1587a9840c6debac688f7b41b35b944831d99 (diff)
Tidy up some overrunning lines
Diffstat (limited to 'src/types.rs')
-rw-r--r--src/types.rs21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/types.rs b/src/types.rs
index 6880cd8bcc2..3ac82ae27ee 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -25,14 +25,17 @@ impl<'a> FmtVisitor<'a> {
                                                                           ..}) => {
                 if bound_lifetimes.len() > 0 {
                     format!("for<{}> {}: {}",
-                            bound_lifetimes.iter().map(|l| self.rewrite_lifetime_def(l)).collect::<Vec<_>>().connect(", "),
+                            bound_lifetimes.iter().map(|l| self.rewrite_lifetime_def(l))
+                                .collect::<Vec<_>>().connect(", "),
                             pprust::ty_to_string(bounded_ty),
-                            bounds.iter().map(|b| self.rewrite_ty_bound(b)).collect::<Vec<_>>().connect(" + "))
+                            bounds.iter().map(|b| self.rewrite_ty_bound(b))
+                                .collect::<Vec<_>>().connect(" + "))
 
                 } else {
                     format!("{}: {}",
                             pprust::ty_to_string(bounded_ty),
-                            bounds.iter().map(|b| self.rewrite_ty_bound(b)).collect::<Vec<_>>().connect(" + "))
+                            bounds.iter().map(|b| self.rewrite_ty_bound(b))
+                                .collect::<Vec<_>>().connect(" + "))
                 }
             }
             &ast::WherePredicate::RegionPredicate(ast::WhereRegionPredicate{ref lifetime,
@@ -40,7 +43,8 @@ impl<'a> FmtVisitor<'a> {
                                                                             ..}) => {
                 format!("{}: {}",
                         pprust::lifetime_to_string(lifetime),
-                        bounds.iter().map(|l| pprust::lifetime_to_string(l)).collect::<Vec<_>>().connect(" + "))
+                        bounds.iter().map(|l| pprust::lifetime_to_string(l))
+                            .collect::<Vec<_>>().connect(" + "))
             }
             &ast::WherePredicate::EqPredicate(ast::WhereEqPredicate{ref path, ref ty, ..}) => {
                 format!("{} = {}", pprust::path_to_string(path), pprust::ty_to_string(ty))
@@ -55,7 +59,8 @@ impl<'a> FmtVisitor<'a> {
 
         format!("{}: {}",
                 pprust::lifetime_to_string(&lifetime.lifetime),
-                lifetime.bounds.iter().map(|l| pprust::lifetime_to_string(l)).collect::<Vec<_>>().connect(" + "))
+                lifetime.bounds.iter().map(|l| pprust::lifetime_to_string(l))
+                    .collect::<Vec<_>>().connect(" + "))
     }
 
     pub fn rewrite_ty_bound(&self, bound: &ast::TyParamBound) -> String {
@@ -77,7 +82,8 @@ impl<'a> FmtVisitor<'a> {
         result.push_str(&token::get_ident(ty_param.ident));
         if ty_param.bounds.len() > 0 {
             result.push_str(": ");
-            result.push_str(&ty_param.bounds.iter().map(|b| self.rewrite_ty_bound(b)).collect::<Vec<_>>().connect(" + "));
+            result.push_str(&ty_param.bounds.iter().map(|b| self.rewrite_ty_bound(b))
+                                .collect::<Vec<_>>().connect(" + "));
         }
         if let Some(ref def) = ty_param.default {
             result.push_str(" = ");
@@ -90,7 +96,8 @@ impl<'a> FmtVisitor<'a> {
     fn rewrite_poly_trait_ref(&self, t: &ast::PolyTraitRef) -> String {
         if t.bound_lifetimes.len() > 0 {
             format!("for<{}> {}",
-                    t.bound_lifetimes.iter().map(|l| self.rewrite_lifetime_def(l)).collect::<Vec<_>>().connect(", "),
+                    t.bound_lifetimes.iter().map(|l| self.rewrite_lifetime_def(l))
+                        .collect::<Vec<_>>().connect(", "),
                     pprust::path_to_string(&t.trait_ref.path))
 
         } else {