diff --git a/src/async_result.ts b/src/async_result.ts index 63b5c5c..6fa3c05 100644 --- a/src/async_result.ts +++ b/src/async_result.ts @@ -11,10 +11,6 @@ export class AsyncResult implements PromiseLike> { readonly promise: Promise> | PromiseLike> | AsyncResult, ) {} - *[Symbol.iterator](): Iterator, T, any> { - return yield this; - } - async *try(): AsyncGenerator, T> { return yield* await this.promise.then((res) => res.try()); } diff --git a/src/result.ts b/src/result.ts index 032fb22..2693096 100644 --- a/src/result.ts +++ b/src/result.ts @@ -26,11 +26,6 @@ export class ResultImpl { this.wrapped = v; } - *[Symbol.iterator](): Iterator, T, any> { - const self = this as unknown as Result; - return yield self; - } - public try(): Generator, T> { const wrapped = this.wrapped; if (this.kind) {