summaryrefslogtreecommitdiff
path: root/rust/src/types.rs
diff options
context:
space:
mode:
authorRubens Brandao <git@rubens.io>2024-06-24 10:35:49 -0300
committerJosh Ferrell <josh@vector35.com>2024-07-02 15:54:54 -0400
commitd2612b537778d7146fb5044d3013214e493959ee (patch)
treeea93bb75b7b4571a5173f5755d9ed4772649dd9d /rust/src/types.rs
parent1d5a2cf45e15abb5c3ee3b50556a1d872800edb7 (diff)
fix return type for Array ComponentReferencedTypes
Diffstat (limited to 'rust/src/types.rs')
-rw-r--r--rust/src/types.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/rust/src/types.rs b/rust/src/types.rs
index 8fab75dc..d5be0e86 100644
--- a/rust/src/types.rs
+++ b/rust/src/types.rs
@@ -1340,13 +1340,13 @@ impl ToOwned for Type {
}
pub struct ComponentReferencedTypes;
-impl CoreArrayProvider for ComponentReferencedTypes{
- type Raw= *mut BNType;
- type Context= ();
- type Wrapped<'a> = &'a Self;
+impl CoreArrayProvider for ComponentReferencedTypes {
+ type Raw = *mut BNType;
+ type Context = ();
+ type Wrapped<'a> = &'a Type;
}
-unsafe impl CoreArrayProviderInner for ComponentReferencedTypes{
+unsafe impl CoreArrayProviderInner for ComponentReferencedTypes {
unsafe fn free(raw: *mut Self::Raw, count: usize, _context: &Self::Context) {
BNComponentFreeReferencedTypes(raw, count)
}
@@ -1541,7 +1541,6 @@ pub struct NamedTypedVariable {
}
impl NamedTypedVariable {
-
pub fn new(var: Variable, name: String, ty: Conf<Ref<Type>>, auto_defined: bool) -> Self {
Self {
name,
@@ -1556,7 +1555,7 @@ impl NamedTypedVariable {
var: Variable::from_raw(var.var),
auto_defined: var.autoDefined,
name: CStr::from_ptr(var.name).to_str().unwrap().to_string(),
- ty: Conf::new(Type::ref_from_raw(var.type_), var.typeConfidence)
+ ty: Conf::new(Type::ref_from_raw(var.type_), var.typeConfidence),
}
}