From d5c679d3ec7441eeb8cf6a55d6409edc38715f9e Mon Sep 17 00:00:00 2001 From: Rubens Brandao Date: Mon, 24 Jun 2024 10:35:49 -0300 Subject: [PATCH] fix return type for Array ComponentReferencedTypes --- rust/src/types.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/rust/src/types.rs b/rust/src/types.rs index 8fab75dc3..d5be0e864 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>, 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), } }