summaryrefslogtreecommitdiff
path: root/rust/src/types.rs
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2022-01-27 22:43:28 -0500
committerKyleMiles <krm504@nyu.edu>2022-01-28 00:24:06 -0500
commit6812c973c9fa9b4ad642ab81856c05f87bd6fcc4 (patch)
treedace4156d03148bcaf02df138ab4e0d93e61bc6f /rust/src/types.rs
parent519c9db22367f2659d1a54599fab47e6313be06e (diff)
Format All Files
Diffstat (limited to 'rust/src/types.rs')
-rw-r--r--rust/src/types.rs16
1 files changed, 12 insertions, 4 deletions
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> {