Format an author for display.
(author: &Author)
| 789 | |
| 790 | /// Format an author for display. |
| 791 | pub(crate) fn format_author(author: &Author) -> String { |
| 792 | if let Some(ref email) = author.email { |
| 793 | format!("{} <{}>", author.name, email) |
| 794 | } else { |
| 795 | author.name.clone() |
| 796 | } |
| 797 | } |
| 798 | |
| 799 | /// Count unique paths affected by hunks. |
| 800 | pub(crate) fn count_unique_paths<H>(hunks: &[GraphOp<H>]) -> usize { |