Format an author for display from an `Author` struct. Combines name and optional email into a standard `"Name "` format. # Arguments `author` - The author to format # Returns Formatted author string.
(author: &Author)
| 617 | /// |
| 618 | /// Formatted author string. |
| 619 | pub fn format_author(author: &Author) -> String { |
| 620 | if let Some(ref email) = author.email { |
| 621 | format!("{} <{}>", author.name, email) |
| 622 | } else { |
| 623 | author.name.clone() |
| 624 | } |
| 625 | } |
| 626 | |
| 627 | /// Output configuration for log display. |
| 628 | /// |