Format an author for display.
(author: &Author)
| 771 | |
| 772 | /// Format an author for display. |
| 773 | pub(crate) fn format_author(author: &Author) -> String { |
| 774 | if let Some(ref email) = author.email { |
| 775 | format!("{} <{}>", author.name, email) |
| 776 | } else { |
| 777 | author.name.clone() |
| 778 | } |
| 779 | } |
| 780 | |
| 781 | /// Count unique paths affected by hunks. |
| 782 | pub(crate) fn count_unique_paths<H>(hunks: &[GraphOp<H>]) -> usize { |