Merge pull request #2700 from Pazzaz/master
Remove unnecessary use of Box in `format_function_type`
This commit is contained in:
commit
a8e7a7c8b8
1 changed files with 2 additions and 6 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue