diff --git a/src/shared/lib/rusty-types/Optional.ts b/src/shared/lib/rusty-types/Optional.ts deleted file mode 100644 index 9776892c..00000000 --- a/src/shared/lib/rusty-types/Optional.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Optional } from "@shared/types/common.types"; - -export function none(): Optional { - return { - isNone: true, - }; -} - -export function some(value: V): Optional { - return { - value, - isNone: false, - }; -} - -export function orDefault(opt: Optional, def: V): V { - if (opt.isNone) { - return def; - } - - return opt.value; -} diff --git a/src/shared/lib/rusty-types/Result.ts b/src/shared/lib/rusty-types/Result.ts deleted file mode 100644 index 538d20ed..00000000 --- a/src/shared/lib/rusty-types/Result.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Result } from "@shared/types/common.types"; - -export function ok(value: V): Result { - return { - value, - isError: false, - }; -} - -export function fail(error: E): Result { - return { - error, - isError: true, - }; -}