We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8679a04 commit c896271Copy full SHA for c896271
src/write/unit.rs
@@ -615,9 +615,10 @@ impl DebuggingInformationEntry {
615
616
/// Return the type abbreviation for this DIE.
617
fn abbreviation(&self, encoding: Encoding) -> Result<Abbreviation> {
618
- let mut attrs = Vec::new();
+ let sibling = self.sibling && !self.children.is_empty();
619
+ let mut attrs = Vec::with_capacity(usize::from(sibling) + self.attrs.len());
620
- if self.sibling && !self.children.is_empty() {
621
+ if sibling {
622
let form = match encoding.format {
623
Format::Dwarf32 => constants::DW_FORM_ref4,
624
Format::Dwarf64 => constants::DW_FORM_ref8,
0 commit comments