From b964c911b2b24840c46c2ae946a4ad9aa58e6a3b Mon Sep 17 00:00:00 2001 From: rhpidfyre Date: Sun, 16 Mar 2025 23:10:00 -0400 Subject: [PATCH] `Result` -> `Option` --- src/rt/rfwfs/enum.ts | 6 +++--- src/rt/rfwfs/wrap.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rt/rfwfs/enum.ts b/src/rt/rfwfs/enum.ts index 072a5eb..1687546 100644 --- a/src/rt/rfwfs/enum.ts +++ b/src/rt/rfwfs/enum.ts @@ -31,9 +31,9 @@ const enum ReadStatus { NotFound, Denied, } -const enum Result { - None, +const enum Option { Ok, + None, } export { @@ -43,5 +43,5 @@ export { PushStatus, ReadStatus, EntryType, - Result, + Option, } \ No newline at end of file diff --git a/src/rt/rfwfs/wrap.ts b/src/rt/rfwfs/wrap.ts index 754f75f..7067c30 100644 --- a/src/rt/rfwfs/wrap.ts +++ b/src/rt/rfwfs/wrap.ts @@ -1,9 +1,9 @@ -import { Result, type ConstEnum } from "./enum" +import { Option, type ConstEnum } from "./enum" import { type Entry } from "./main" type WrapResultEntry = WrapResult type WrapBSearch = WrapResult -type WrapResultNone = WrapResult +type WrapResultNone = WrapResult interface WrapResult { /** The resulting value if `U` is a success */ @@ -25,7 +25,7 @@ function wrap_entry(status: T, result?: U) } function wrap_none(status: T): WrapResultNone { - return wrap(Result.None, status) + return wrap(Option.None, status) } export default wrap