-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fixup some nits from #44238 #44329
Fixup some nits from #44238 #44329
Conversation
cc #44229 |
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.
Apart from that one error this looks good to me.
src/librustdoc/html/render.rs
Outdated
} | ||
if s.len() > 70 { | ||
return format!("{} ... {}", &s[..50], &s[s.len()-20..]); | ||
let mut lo = 70; |
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.
This should be 45 to make sure the resulting string is at most 70 characters.
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.
Addressed this, thanks! I set to 50 (as in the old code), there is no strict need to be under 70 chars, it is just roughly a number that should fit on one line (comfortably under 80 chars).
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.
Well that's okay but if the line is exactly 71 characters for example then using 50 will skip one character and replace it with " ... "
making the string display actually longer. It's only a minor thing though.
f0a816d
to
0573949
Compare
ping @ollie27 for re-review |
@bors: r+ |
@ollie27: 🔑 Insufficient privileges: Not in reviewers |
@bors: r=ollie27 |
📌 Commit 0573949 has been approved by |
@bors rollup |
Fixup some nits from rust-lang#44238 r? @ollie27
Fixup some nits from rust-lang#44238 r? @ollie27
Fixup some nits from rust-lang#44238 r? @ollie27
r? @ollie27