Get statistics for this file.
(&self)
| 660 | |
| 661 | /// Get statistics for this file. |
| 662 | pub fn stats(&self) -> CreditStats { |
| 663 | let mut stats = CreditStats::new(); |
| 664 | for range in &self.ranges { |
| 665 | for _ in 0..range.line_count() { |
| 666 | stats.add(&range.credit); |
| 667 | } |
| 668 | } |
| 669 | stats |
| 670 | } |
| 671 | |
| 672 | /// Get the total line count. |
| 673 | pub fn total_lines(&self) -> u64 { |