Format an author for display.
(author: &Author)
| 806 | |
| 807 | /// Format an author for display. |
| 808 | pub(crate) fn format_author(author: &Author) -> String { |
| 809 | if let Some(ref email) = author.email { |
| 810 | format!("{} <{}>", author.name, email) |
| 811 | } else { |
| 812 | author.name.clone() |
| 813 | } |
| 814 | } |
| 815 | |
| 816 | /// Count unique paths affected by hunks. |
| 817 | pub(crate) fn count_unique_paths<H>(hunks: &[GraphOp<H>]) -> usize { |