Skip to content

Commit

Permalink
rustdoc: properly calculate line length for impl where clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
QuietMisdreavus committed Dec 20, 2016
1 parent 833b03a commit 941b6b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/html/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl<'a> fmt::Display for WhereClause<'a> {
if !f.alternate() {
clause.push_str("</span>");
let plain = format!("{:#}", self);
if plain.len() > 80 {
if plain.len() + pad > 80 {
//break it onto its own line regardless, but make sure method impls and trait
//blocks keep their fixed padding (2 and 9, respectively)
let padding = if pad > 10 {
Expand Down

0 comments on commit 941b6b0

Please sign in to comment.