Get the credit for a specific line.
(&self, line: u64)
| 652 | |
| 653 | /// Get the credit for a specific line. |
| 654 | pub fn get_credit(&self, line: u64) -> Option<&Credit> { |
| 655 | self.ranges |
| 656 | .iter() |
| 657 | .find(|r| r.contains(line)) |
| 658 | .map(|r| &r.credit) |
| 659 | } |
| 660 | |
| 661 | /// Get statistics for this file. |
| 662 | pub fn stats(&self) -> CreditStats { |