From ff42df855052834994b9b7aba8960311561366c9 Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Wed, 24 Nov 2021 15:42:42 -0500 Subject: Rust API : Correct naming convention on scope and access fields and apply cargofmt for types api changes --- rust/src/types.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'rust/src') 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 = result::Result; 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, ); } -- cgit v1.3.1