Skip to content

Commit

Permalink
Pass in defs instead of appending
Browse files Browse the repository at this point in the history
  • Loading branch information
espeon committed Dec 2, 2024
1 parent e91fa65 commit edd828c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/legacy/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,8 @@ where
}

pub fn typedef<TArg: Type, TResult: Type>(defs: &mut TypeMap) -> ProcedureDataType {
let mut type_map = TypeMap::default();
let arg_ty = TArg::reference(&mut type_map, &[]).inner;
let result_ty = TResult::reference(&mut type_map, &[]).inner;
let arg_ty = TArg::reference(defs, &[]).inner;
let result_ty = TResult::reference(defs, &[]).inner;

defs.append(&mut type_map);

ProcedureDataType { arg_ty, result_ty }
}

0 comments on commit edd828c

Please sign in to comment.