summaryrefslogtreecommitdiff
path: root/rust/src
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2021-11-24 15:42:42 -0500
committerKyleMiles <krm504@nyu.edu>2021-11-24 15:42:53 -0500
commitff42df855052834994b9b7aba8960311561366c9 (patch)
tree29b1ed2fd1638ca82c0933e301471e9a5da0c013 /rust/src
parent628188fd9a544013ed77eaf994935d9b990526fa (diff)
Rust API : Correct naming convention on scope and access fields and apply cargofmt for types api changes
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/types.rs20
1 files changed, 14 insertions, 6 deletions
diff --git a/rust/src/types.rs b/rust/src/types.rs
index c56611d0..ec12712b 100644
--- a/rust/src/types.rs
+++ b/rust/src/types.rs
@@ -30,6 +30,8 @@ pub type Result<R> = result::Result<R, ()>;
pub type ReferenceType = BNReferenceType;
pub type TypeClass = BNTypeClass;
pub type NamedTypeReferenceClass = BNNamedTypeReferenceClass;
+pub type MemberAccess = BNMemberAccess;
+pub type MemberScope = BNMemberScope;
////////////////
// Confidence
@@ -1263,12 +1265,18 @@ impl StructureBuilder {
&'a mut self,
t: T,
name: S,
- access: BNMemberAccess,
- scope: BNMemberScope,
+ access: MemberAccess,
+ scope: MemberScope,
) -> &'a mut Self {
let name = name.as_bytes_with_nul();
unsafe {
- BNAddStructureBuilderMember(self.handle, &t.into().into(), name.as_ref().as_ptr() as _, access, scope);
+ BNAddStructureBuilderMember(
+ self.handle,
+ &t.into().into(),
+ name.as_ref().as_ptr() as _,
+ access,
+ scope,
+ );
}
self
@@ -1280,8 +1288,8 @@ impl StructureBuilder {
name: S,
offset: u64,
overwrite_existing: bool,
- access: BNMemberAccess,
- scope: BNMemberScope,
+ access: MemberAccess,
+ scope: MemberScope,
) -> &'a mut Self {
let name = name.as_bytes_with_nul();
unsafe {
@@ -1292,7 +1300,7 @@ impl StructureBuilder {
offset,
overwrite_existing,
access,
- scope
+ scope,
);
}