Set capacity of the string passed to push_item_name
.
Other callsites already do this, but these two were missed. This avoids some allocations.
This commit is contained in:
parent
f2d863fa75
commit
d20b1a8f6b
2 changed files with 2 additions and 2 deletions
|
@ -331,7 +331,7 @@ impl<'ll, 'tcx> DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
|||
llvm::LLVMRustDIBuilderCreateSubroutineType(DIB(self), fn_signature)
|
||||
};
|
||||
|
||||
let mut name = String::new();
|
||||
let mut name = String::with_capacity(64);
|
||||
type_names::push_item_name(tcx, def_id, false, &mut name);
|
||||
|
||||
// Find the enclosing function, in case this is a closure.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue