]> git.lizzy.rs Git - rust.git/commitdiff
Cargo fmt
authortopecongiro <seuchida@gmail.com>
Tue, 7 Nov 2017 23:25:42 +0000 (08:25 +0900)
committertopecongiro <seuchida@gmail.com>
Tue, 7 Nov 2017 23:25:42 +0000 (08:25 +0900)
src/items.rs

index 731ce2343886018f0ff0d8aff775e9db70ec2a87..dc3abd88ffd89619f2fe7ccc377eb12d63c13f03 100644 (file)
@@ -2142,7 +2142,9 @@ fn rewrite_args(
     generics_str_contains_newline: bool,
 ) -> Option<String> {
     let mut arg_item_strs = args.iter()
-        .map(|arg| arg.rewrite(context, Shape::legacy(multi_line_budget, arg_indent)))
+        .map(|arg| {
+            arg.rewrite(context, Shape::legacy(multi_line_budget, arg_indent))
+        })
         .collect::<Option<Vec<_>>>()?;
 
     // Account for sugary self.
@@ -2841,15 +2843,17 @@ fn rewrite(&self, context: &RewriteContext, shape: Shape) -> Option<String> {
         let span = mk_sp(self.span.lo(), self.span.hi() - BytePos(1));
 
         let item_str = match self.node {
-            ast::ForeignItemKind::Fn(ref fn_decl, ref generics) => rewrite_fn_base(
-                context,
-                shape.indent,
-                self.ident,
-                &FnSig::new(fn_decl, generics, self.vis.clone()),
-                span,
-                false,
-                false,
-            ).map(|(s, _)| format!("{};", s)),
+            ast::ForeignItemKind::Fn(ref fn_decl, ref generics) => {
+                rewrite_fn_base(
+                    context,
+                    shape.indent,
+                    self.ident,
+                    &FnSig::new(fn_decl, generics, self.vis.clone()),
+                    span,
+                    false,
+                    false,
+                ).map(|(s, _)| format!("{};", s))
+            }
             ast::ForeignItemKind::Static(ref ty, is_mutable) => {
                 // FIXME(#21): we're dropping potential comments in between the
                 // function keywords here.