Skip to content

Commit

Permalink
fix return type for Array ComponentReferencedTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
rbran committed Jun 24, 2024
1 parent c0c48b2 commit d5c679d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions rust/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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,
Expand All @@ -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),
}
}

Expand Down

0 comments on commit d5c679d

Please sign in to comment.