diff options
| author | KyleMiles <krm504@nyu.edu> | 2022-01-27 22:43:28 -0500 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2022-01-28 00:24:06 -0500 |
| commit | 6812c973c9fa9b4ad642ab81856c05f87bd6fcc4 (patch) | |
| tree | dace4156d03148bcaf02df138ab4e0d93e61bc6f /rust/src | |
| parent | 519c9db22367f2659d1a54599fab47e6313be06e (diff) | |
Format All Files
Diffstat (limited to 'rust/src')
| -rw-r--r-- | rust/src/disassembly.rs | 6 | ||||
| -rw-r--r-- | rust/src/types.rs | 16 |
2 files changed, 15 insertions, 7 deletions
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<Vec<InstructionTextToken>> 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<bool>) -> Ref<Self> { + pub fn enumeration( + enumeration: &Enumeration, + width: usize, + is_signed: Conf<bool>, + ) -> Ref<Self> { //! 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<Self> { 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<S: BnStrCompatible>(name: S, t: &Type) -> Ref<Self> { |
