Skip to content

Commit

Permalink
remove rawUntypedPtr from swayTypeMatchers
Browse files Browse the repository at this point in the history
  • Loading branch information
nedsalk committed Dec 15, 2024
1 parent d5df0f1 commit 2fc0a2f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
9 changes: 0 additions & 9 deletions packages/abi/src/matchers/sway-type-matchers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const testMappings: Record<keyof typeof swayTypeMatchers, `${string}-matched`> =
array: 'array-matched',
assetId: 'assetId-matched',
evmAddress: 'evmAddress-matched',
rawUntypedPtr: 'rawUntypedPtr-matched',
rawUntypedSlice: 'rawUntypedSlice-matched',
str: 'str-matched',
};
Expand Down Expand Up @@ -231,14 +230,6 @@ describe('sway type matchers', () => {
await verifyOtherMatchersDontMatch(key, swayType);
});

test('rawUntypedPtr', async () => {
const key = 'rawUntypedPtr';
const swayType = 'raw untyped ptr';

expect(matcher({ swayType })).toEqual(`${key}-matched`);
await verifyOtherMatchersDontMatch(key, swayType);
});

test('rawUntypedSlice', async () => {
const key = 'rawUntypedSlice';
const swayType = 'raw untyped slice';
Expand Down
3 changes: 0 additions & 3 deletions packages/abi/src/matchers/sway-type-matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export type SwayType =
| 'array'
| 'assetId'
| 'evmAddress'
| 'rawUntypedPtr'
| 'rawUntypedSlice';

type Matcher = (type: string) => boolean;
Expand Down Expand Up @@ -69,7 +68,6 @@ const result: Matcher = (type) => type === 'enum std::result::Result';
export const ENUM_REGEX = /^enum (.+::)?(?<name>.+)$/m;
const enumMatcher: Matcher = (type) => !option(type) && !result(type) && ENUM_REGEX.test(type);

const rawUntypedPtr: Matcher = (type) => type === 'raw untyped ptr';
const rawUntypedSlice: Matcher = (type) => type === 'raw untyped slice';

export const swayTypeMatchers: Record<SwayType, Matcher> = {
Expand Down Expand Up @@ -100,7 +98,6 @@ export const swayTypeMatchers: Record<SwayType, Matcher> = {
option,
result,

rawUntypedPtr,
rawUntypedSlice,
};

Expand Down

0 comments on commit 2fc0a2f

Please sign in to comment.