Skip to content

Commit

Permalink
Remove extra space in test description (of a mod test)
Browse files Browse the repository at this point in the history
  • Loading branch information
malbarbo committed Mar 6, 2017
1 parent 11bc48a commit 2e5b380
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/librustdoc/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,11 @@ impl Collector {
as_test_harness: bool, compile_fail: bool, error_codes: Vec<String>,
line: usize, filename: String) {
let name = if self.use_headers {
let s = self.current_header.as_ref().map(|s| &**s).unwrap_or("");
format!("{} - {} (line {})", filename, s, line)
if let Some(ref header) = self.current_header {
format!("{} - {} (line {})", filename, header, line)
} else {
format!("{} - (line {})", filename, line)
}
} else {
format!("{} - {} (line {})", filename, self.names.join("::"), line)
};
Expand Down

0 comments on commit 2e5b380

Please sign in to comment.