rename is_difference to is_differing

This commit is contained in:
Denis-Cosmin Nutiu 2024-10-24 19:14:19 +03:00
parent e5ecc46c40
commit 8ad7f5c305
2 changed files with 4 additions and 4 deletions

View file

@ -3,7 +3,7 @@ use std::fmt::Formatter;
use std::ops::Deref;
pub trait Line: fmt::Display {
fn is_difference(&self) -> bool;
fn is_differing(&self) -> bool;
}
/// Line represents a non-differing line.
@ -33,7 +33,7 @@ impl fmt::Display for MatchedLine {
}
impl Line for MatchedLine {
fn is_difference(&self) -> bool {
fn is_differing(&self) -> bool {
false
}
}
@ -94,7 +94,7 @@ impl fmt::Display for DifferingLine {
}
impl Line for DifferingLine {
fn is_difference(&self) -> bool {
fn is_differing(&self) -> bool {
true
}
}

View file

@ -37,7 +37,7 @@ fn main() {
for line in lines.iter() {
let line = line.deref();
print!("{}", line);
if line.is_difference() {
if line.is_differing() {
differences_counter += 1;
}
}