Format an author for display.
(author: &Author)
| 531 | |
| 532 | /// Format an author for display. |
| 533 | pub(crate) fn format_author(author: &Author) -> String { |
| 534 | if let Some(ref email) = author.email { |
| 535 | format!("{} <{}>", author.name, email) |
| 536 | } else { |
| 537 | author.name.clone() |
| 538 | } |
| 539 | } |
| 540 | |
| 541 | /// Count unique paths affected by hunks. |
| 542 | pub(crate) fn count_unique_paths<H>(hunks: &[GraphOp<H>]) -> usize { |