Skip to content

Fix bugs in width computation for bin op #124

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

Merged
merged 1 commit into from
Jul 3, 2015

Conversation

cassiersg
Copy link
Contributor

I didn't had enough time to review and test @nrc merged, so I correct here a bug in #99 : lhs was formatted into width, and rhs into max_width, while the inverse should be done.

@@ -302,7 +303,9 @@ fn rewrite_binary_op(context: &RewriteContext,
// operations with high precendence close together.
let rhs_result = try_opt!(rhs.rewrite(context, width, offset));

if rhs_result.len() > remaining_width {
// Secode condition is needed in case of line break not caused by a
Copy link
Member

Choose a reason for hiding this comment

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

typo: Secode/Second

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@nrc
Copy link
Member

nrc commented Jul 3, 2015

Thanks!

nrc added a commit that referenced this pull request Jul 3, 2015
Fix bugs in width computation for bin op
@nrc nrc merged commit 54d2620 into rust-lang:master Jul 3, 2015
@marcusklaas
Copy link
Contributor

👍

@cassiersg cassiersg deleted the fix-bin-op branch August 27, 2015 13:03
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.

3 participants