Skip to content

Commit 7fa068e

Browse files
committed
Misc rust formatting
1 parent 8820fd7 commit 7fa068e

File tree

1 file changed

+17
-18
lines changed
  • plugins/dwarf/dwarf_export/src

1 file changed

+17
-18
lines changed

plugins/dwarf/dwarf_export/src/lib.rs

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -673,26 +673,25 @@ fn write_dwarf<T: gimli::Endianity>(
673673
let mut sections = Sections::new(EndianVec::new(endian));
674674
dwarf.write(&mut sections).map_err(|e| e.to_string())?;
675675

676-
sections
677-
.for_each(|input_id, input_data| {
678-
// Create section in output object
679-
let output_id = out_object.add_section(
680-
vec![], // Only machos have segment names? see object::write::Object::segment_name
681-
input_id.name().as_bytes().to_vec(),
682-
SectionKind::Debug, // TODO: Might be wrong
683-
);
676+
sections.for_each(|input_id, input_data| {
677+
// Create section in output object
678+
let output_id = out_object.add_section(
679+
vec![], // Only machos have segment names? see object::write::Object::segment_name
680+
input_id.name().as_bytes().to_vec(),
681+
SectionKind::Debug, // TODO: Might be wrong
682+
);
684683

685-
// Write data to section in output object
686-
let out_section = out_object.section_mut(output_id);
687-
if out_section.is_bss() {
688-
return Err("Please report this as a bug: output section is bss".to_string());
689-
} else {
690-
out_section.set_data(input_data.clone().into_vec(), 1);
691-
}
692-
// out_section.flags = in_section.flags(); // TODO
684+
// Write data to section in output object
685+
let out_section = out_object.section_mut(output_id);
686+
if out_section.is_bss() {
687+
return Err("Please report this as a bug: output section is bss".to_string());
688+
} else {
689+
out_section.set_data(input_data.clone().into_vec(), 1);
690+
}
691+
// out_section.flags = in_section.flags(); // TODO
693692

694-
Ok(())
695-
})?;
693+
Ok(())
694+
})?;
696695

697696
if let Ok(out_data) = out_object.write() {
698697
if let Err(err) = fs::write(file_path, out_data) {

0 commit comments

Comments
 (0)