Skip to content

Commit 941b6b0

Browse files
author
QuietMisdreavus
committed
rustdoc: properly calculate line length for impl where clauses
1 parent 833b03a commit 941b6b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl<'a> fmt::Display for WhereClause<'a> {
207207
if !f.alternate() {
208208
clause.push_str("</span>");
209209
let plain = format!("{:#}", self);
210-
if plain.len() > 80 {
210+
if plain.len() + pad > 80 {
211211
//break it onto its own line regardless, but make sure method impls and trait
212212
//blocks keep their fixed padding (2 and 9, respectively)
213213
let padding = if pad > 10 {

0 commit comments

Comments
 (0)