From 8ad7f5c30575ef4682639af720ed7bfd5f852db5 Mon Sep 17 00:00:00 2001 From: Denis Nutiu Date: Thu, 24 Oct 2024 19:14:19 +0300 Subject: [PATCH] rename is_difference to is_differing --- src/line.rs | 6 +++--- src/main.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/line.rs b/src/line.rs index 224370c..3def30f 100644 --- a/src/line.rs +++ b/src/line.rs @@ -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 } } diff --git a/src/main.rs b/src/main.rs index 76af8f1..87d9077 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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; } }