]> git.lizzy.rs Git - rust.git/blobdiff - src/types.rs
Run rustfmt on the code
[rust.git] / src / types.rs
index c16b9eadf4e522d97c5187de8182ee709228855c..6880cd8bcc2f93abc323da39a4539dcec384721d 100644 (file)
@@ -15,8 +15,7 @@
 use syntax::print::pprust;
 
 impl<'a> FmtVisitor<'a> {
-    pub fn rewrite_pred(&self, predicate: &ast::WherePredicate) -> String
-    {
+    pub fn rewrite_pred(&self, predicate: &ast::WherePredicate) -> String {
         // TODO dead spans
         // TODO assumes we'll always fit on one line...
         match predicate {
@@ -49,8 +48,7 @@ pub fn rewrite_pred(&self, predicate: &ast::WherePredicate) -> String
         }
     }
 
-    pub fn rewrite_lifetime_def(&self, lifetime: &ast::LifetimeDef) -> String
-    {
+    pub fn rewrite_lifetime_def(&self, lifetime: &ast::LifetimeDef) -> String {
         if lifetime.bounds.len() == 0 {
             return pprust::lifetime_to_string(&lifetime.lifetime);
         }
@@ -60,8 +58,7 @@ pub fn rewrite_lifetime_def(&self, lifetime: &ast::LifetimeDef) -> String
                 lifetime.bounds.iter().map(|l| pprust::lifetime_to_string(l)).collect::<Vec<_>>().connect(" + "))
     }
 
-    pub fn rewrite_ty_bound(&self, bound: &ast::TyParamBound) -> String
-    {
+    pub fn rewrite_ty_bound(&self, bound: &ast::TyParamBound) -> String {
         match *bound {
             ast::TyParamBound::TraitTyParamBound(ref tref, ast::TraitBoundModifier::None) => {
                 self.rewrite_poly_trait_ref(tref)
@@ -75,8 +72,7 @@ pub fn rewrite_ty_bound(&self, bound: &ast::TyParamBound) -> String
         }
     }
 
-    pub fn rewrite_ty_param(&self, ty_param: &ast::TyParam) -> String
-    {
+    pub fn rewrite_ty_param(&self, ty_param: &ast::TyParam) -> String {
         let mut result = String::with_capacity(128);
         result.push_str(&token::get_ident(ty_param.ident));
         if ty_param.bounds.len() > 0 {
@@ -91,8 +87,7 @@ pub fn rewrite_ty_param(&self, ty_param: &ast::TyParam) -> String
         result
     }
 
-    fn rewrite_poly_trait_ref(&self, t: &ast::PolyTraitRef) -> String
-    {
+    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(", "),