Compare primary with value instead of dropping it

This commit is contained in:
AnthonyMikh 2019-10-02 19:48:21 +03:00 committed by GitHub
parent f2023ac599
commit df203a297f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1026,7 +1026,8 @@ impl EmitterWriter {
children.iter()
.map(|sub| self.get_multispan_max_line_num(&sub.span))
.max()
.unwrap_or(primary)
.unwrap_or(0)
.max(primary)
}
/// Adds a left margin to every line but the first, given a padding length and the label being