-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove obsolete "unwrap" #1360
Conversation
@@ -51,7 +51,7 @@ export function makeHandledPromise(Promise) { | |||
let presenceToHandler; | |||
let presenceToPromise; | |||
let promiseToUnsettledHandler; | |||
let promiseToPresence; // only for HandledPromise.unwrap | |||
let promiseToPresence; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That old comment was correct when written. But trying to remove promiseToPresence
reveals that it has since grown another use --- in shortening.
@@ -33,8 +33,6 @@ export function producePromise() { | |||
/** @type {(reason: any) => void} */ | |||
let rej = NOOP_INITIALIZER; | |||
|
|||
// We use a HandledPromise so that we can run HandledPromise.unwrap(p) | |||
// even if p doesn't travel through a comms system (like SwingSet's). | |||
const p = new HandledPromise((resolve, reject) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even without that rationale, I still prefer HandledPromise
and so left the code alone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
See #1361