Compare two lines for equality. Uses hash-based pre-filtering for performance: 1. If hashes differ, lines are definitely different (fast path) 2. If hashes match, compare bytes to handle collisions This comparison is **strict** - lines must match exactly including any trailing newline. For lenient comparison, use [`equals`](Self::equals).
(&self, other: &Self)
| 327 | /// This comparison is **strict** - lines must match exactly including |
| 328 | /// any trailing newline. For lenient comparison, use [`equals`](Self::equals). |
| 329 | fn eq(&self, other: &Self) -> bool { |
| 330 | // Fast path: different hashes means definitely not equal |
| 331 | if self.hash != other.hash { |
| 332 | return false; |
| 333 | } |
| 334 | |
| 335 | // Hashes match, compare content (handles hash collisions) |
| 336 | self.content == other.content |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | impl<'a> Eq for Line<'a> {} |
nothing calls this directly
no outgoing calls
no test coverage detected