Skip to content
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

Merged
merged 1 commit into from
Aug 8, 2020
Merged

fix: remove obsolete "unwrap" #1360

merged 1 commit into from
Aug 8, 2020

Conversation

erights
Copy link
Member

@erights erights commented Aug 3, 2020

See #1361

@erights erights requested a review from michaelfig August 3, 2020 01:53
@@ -51,7 +51,7 @@ export function makeHandledPromise(Promise) {
let presenceToHandler;
let presenceToPromise;
let promiseToUnsettledHandler;
let promiseToPresence; // only for HandledPromise.unwrap
let promiseToPresence;
Copy link
Member Author

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) => {
Copy link
Member Author

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.

Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@erights erights merged commit 5796e0e into master Aug 8, 2020
@erights erights deleted the remove-unwrap branch August 8, 2020 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants