Create stats from a single diff.
(diff: &DiffResult)
| 755 | impl DiffStats { |
| 756 | /// Create stats from a single diff. |
| 757 | pub fn from_diff(diff: &DiffResult) -> Self { |
| 758 | Self { |
| 759 | files_changed: 1, |
| 760 | lines_added: diff.insertions(), |
| 761 | lines_removed: diff.deletions(), |
| 762 | } |
| 763 | } |
| 764 | |
| 765 | /// Merge another stats into this one. |
| 766 | pub fn merge(&mut self, other: &DiffStats) { |
nothing calls this directly
no test coverage detected