~taiite/protodump

d9b39ccc86e2d7031e3b1b895a8b2165f35a232b — Hubert Hirtz 1 year, 5 months ago 2144bd7
Fix clippy warnings
2 files changed, 6 insertions(+), 10 deletions(-)

M src/dwarf.rs
M src/types.rs
M src/dwarf.rs => src/dwarf.rs +3 -7
@@ 238,7 238,7 @@ where
                    continue;
                }

                let name = entry_name(&dwarf, &unit, entry)?;
                let name = entry_name(dwarf, &unit, entry)?;
                let typ = entry_type(&mut type_cache, &unit, entry)?;
                if name.is_none() {
                    continue;


@@ 253,16 253,12 @@ where

                if entry.has_children() {
                    entries.next_dfs()?.unwrap();
                    loop {
                        let entry = match entries.current() {
                            Some(entry) => entry,
                            None => break,
                        };
                    while let Some(entry) = entries.current() {
                        if entry.tag() != gimli::DW_TAG_formal_parameter {
                            entries.next_sibling()?;
                            continue;
                        }
                        let name = entry_name(&dwarf, &unit, entry)?;
                        let name = entry_name(dwarf, &unit, entry)?;
                        let type_ = entry_type(&mut type_cache, &unit, entry)?;
                        if let Some(type_) = type_ {
                            parameters.push(Parameter { name, type_ });

M src/types.rs => src/types.rs +3 -3
@@ 46,7 46,7 @@ pub struct Member<R> {
}

/// Variant of an enumeration.
#[derive(Copy, Clone, Debug, PartialEq)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct Enumerator<R> {
    name: R,
    value: u64,


@@ 99,7 99,7 @@ where
}

/// A primitive type like `int`.
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub struct Primitive {
    byte_size: u64,
    encoding: gimli::DwAte,


@@ 739,7 739,7 @@ impl Comparator {
                    representation: i2_repr,
                    enumerators: i2_values,
                },
            ) => i1_repr == i2_repr && &*i1_values == &*i2_values,
            ) => i1_repr == i2_repr && i1_values == i2_values,
            (Definition::Subroutine(i1), Definition::Subroutine(i2)) => {
                let return_type_eq = match (&i1.return_type, &i2.return_type) {
                    (None, None) => true,