about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNick Cameron <nrc@ncameron.org>2018-05-13 10:04:38 +1200
committerGitHub <noreply@github.com>2018-05-13 10:04:38 +1200
commita8e7a7c8b8af13e33257c136fa0c9e88e7e216ca (patch)
tree1c4fcc418918a270e1af3c4fe4f27433247ee6f1 /src
parentc34a387eb756f435c947557dd219986d98d00a00 (diff)
parent1c1763c7ae2deb740dd58d5832ccb5c2c6c54472 (diff)
Merge pull request #2700 from Pazzaz/master
Remove unnecessary use of Box in `format_function_type`
Diffstat (limited to 'src')
-rw-r--r--src/types.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/types.rs b/src/types.rs
index 47a52281e28..3c2a2287d5c 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -305,7 +305,7 @@ where
         T: Deref,
         <T as Deref>::Target: Rewrite + Spanned,
     {
-        Regular(Box<T>),
+        Regular(T),
         Variadic(BytePos),
     }
 
@@ -332,11 +332,7 @@ where
     let list_lo = context.snippet_provider.span_after(span, "(");
     let items = itemize_list(
         context.snippet_provider,
-        // FIXME Would be nice to avoid this allocation,
-        // but I couldn't get the types to work out.
-        inputs
-            .map(|i| ArgumentKind::Regular(Box::new(i)))
-            .chain(variadic_arg),
+        inputs.map(ArgumentKind::Regular).chain(variadic_arg),
         ")",
         ",",
         |arg| match *arg {