Format an author for display.
(author: &Author)
| 829 | |
| 830 | /// Format an author for display. |
| 831 | pub(crate) fn format_author(author: &Author) -> String { |
| 832 | if let Some(ref email) = author.email { |
| 833 | format!("{} <{}>", author.name, email) |
| 834 | } else { |
| 835 | author.name.clone() |
| 836 | } |
| 837 | } |
| 838 | |
| 839 | /// Count unique paths affected by hunks. |
| 840 | pub(crate) fn count_unique_paths<H>(hunks: &[GraphOp<H>]) -> usize { |