Skip to content

Commit a8e7a7c

Browse files
authored
Merge pull request #2700 from Pazzaz/master
Remove unnecessary use of Box in `format_function_type`
2 parents c34a387 + 1c1763c commit a8e7a7c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/types.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ where
305305
T: Deref,
306306
<T as Deref>::Target: Rewrite + Spanned,
307307
{
308-
Regular(Box<T>),
308+
Regular(T),
309309
Variadic(BytePos),
310310
}
311311

@@ -332,11 +332,7 @@ where
332332
let list_lo = context.snippet_provider.span_after(span, "(");
333333
let items = itemize_list(
334334
context.snippet_provider,
335-
// FIXME Would be nice to avoid this allocation,
336-
// but I couldn't get the types to work out.
337-
inputs
338-
.map(|i| ArgumentKind::Regular(Box::new(i)))
339-
.chain(variadic_arg),
335+
inputs.map(ArgumentKind::Regular).chain(variadic_arg),
340336
")",
341337
",",
342338
|arg| match *arg {

0 commit comments

Comments
 (0)