From 6812c973c9fa9b4ad642ab81856c05f87bd6fcc4 Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Thu, 27 Jan 2022 22:43:28 -0500 Subject: Format All Files --- rust/src/disassembly.rs | 6 +++--- rust/src/types.rs | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'rust/src') diff --git a/rust/src/disassembly.rs b/rust/src/disassembly.rs index c4ca2b33..8edf3c4f 100644 --- a/rust/src/disassembly.rs +++ b/rust/src/disassembly.rs @@ -128,7 +128,7 @@ impl From> for DisassemblyTextLine { hasTypeInfo: false, parentType: ptr::null_mut(), fieldIndex: usize::MAX, - offset: 0 + offset: 0, }, }) } @@ -168,7 +168,7 @@ impl From<&Vec<&str>> for DisassemblyTextLine { hasTypeInfo: false, parentType: ptr::null_mut(), fieldIndex: usize::MAX, - offset: 0 + offset: 0, }, }) } @@ -197,7 +197,7 @@ impl Default for DisassemblyTextLine { hasTypeInfo: false, parentType: ptr::null_mut(), fieldIndex: usize::MAX, - offset: 0 + offset: 0, }, }) } diff --git a/rust/src/types.rs b/rust/src/types.rs index 17721361..221fcb17 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -405,7 +405,7 @@ impl TypeBuilder { 0, 1, &mut is_const, - &mut is_volatile + &mut is_volatile, )) } } @@ -727,7 +727,11 @@ impl Type { unsafe { Self::ref_from_raw(BNCreateArrayType(&t.into().into(), count)) } } - pub fn enumeration(enumeration: &Enumeration, width: usize, is_signed: Conf) -> Ref { + pub fn enumeration( + enumeration: &Enumeration, + width: usize, + is_signed: Conf, + ) -> Ref { //! The C/C++ APIs require an associated architecture, but in the core we only query the default_int_size if the given width is 0 //! For simplicity's sake, that convention isn't followed and you can query the default_int_size from an arch, if you have it, if you need to unsafe { @@ -749,11 +753,15 @@ impl Type { pub fn named_type(type_reference: &NamedTypeReference) -> Ref { let mut is_const = Conf::new(false, min_confidence()).into(); let mut is_volatile = Conf::new(false, min_confidence()).into(); - unsafe { Self::ref_from_raw(BNCreateNamedTypeReference(type_reference.handle, + unsafe { + Self::ref_from_raw(BNCreateNamedTypeReference( + type_reference.handle, 0, 1, &mut is_const, - &mut is_volatile)) } + &mut is_volatile, + )) + } } pub fn named_type_from_type(name: S, t: &Type) -> Ref { -- cgit v1.3.1