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

Minor optimization to repl.ts #1561

Merged
merged 1 commit into from
Jan 24, 2019
Merged

Minor optimization to repl.ts #1561

merged 1 commit into from
Jan 24, 2019

Conversation

jorroll
Copy link
Contributor

@jorroll jorroll commented Jan 22, 2019

stack.pop() will return undefined if stack is empty, so the stack.length === 0 check is unnecessary.

This is a minor optimization to parenthesesAreOpen() that was pointed out in https://codereview.stackexchange.com/a/46039/148556 (which the original author of parenthesesAreOpen() drew inspiration from).

@CLAassistant
Copy link

CLAassistant commented Jan 22, 2019

CLA assistant check
All committers have signed the CLA.

@daynin
Copy link
Contributor

daynin commented Jan 23, 2019

LGTM

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM - thanks

@ry ry merged commit 41cf828 into denoland:master Jan 24, 2019
@jorroll jorroll deleted the patch-1 branch January 24, 2019 14:47
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.

None yet

4 participants