Skip to content

Conversation

nrc
Copy link
Member

@nrc nrc commented May 26, 2016

Fixes #1006

src/types.rs Outdated
// 4 = "for<".len()
result.push_str(&try_opt!(bare_fn.lifetimes
.iter()
.map(|l| l.rewrite(context, try_opt!(width.checked_sub(4)), offset + 4))
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically, the width should be subtracted by 5 to account for >. This also gives every item the same constraints, which can lead to incorrect results. I don't expect it to matter though, as this will probably do fine most of the time. Perhaps add a comment that we should use the list formatting machinery if this ever needs an upgrade?

@marcusklaas
Copy link
Contributor

r+ with an additional comment

@nrc nrc merged commit 6e01fac into master May 27, 2016
@marcusklaas marcusklaas deleted the hrtb branch May 28, 2016 09:51
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