From 1c1763c7ae2deb740dd58d5832ccb5c2c6c54472 Mon Sep 17 00:00:00 2001 From: Pazzaz Date: Sat, 12 May 2018 10:53:06 +0200 Subject: [PATCH] Remove unnecessary use of Box in `format_function_type` --- src/types.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/types.rs b/src/types.rs index 47a52281e28d..3c2a2287d5c4 100644 --- a/src/types.rs +++ b/src/types.rs @@ -305,7 +305,7 @@ where T: Deref, ::Target: Rewrite + Spanned, { - Regular(Box), + 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 {