MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / has_changes

Method has_changes

atomic-core/src/diff/word.rs:349–351  ·  view source on GitHub ↗

Check if there are any changes. Returns `true` if any operation is not Equal. # Example ```rust use atomic_core::diff::word::word_diff; let same = word_diff(b"hello", b"hello"); assert!(!same.has_changes()); let different = word_diff(b"hello", b"world"); assert!(different.has_changes()); ```

(&self)

Source from the content-addressed store, hash-verified

347 /// assert!(different.has_changes());
348 /// ```
349 pub fn has_changes(&self) -> bool {
350 self.ops.iter().any(|op| op.is_change())
351 }
352
353 /// Check if the sequences are identical.
354 ///

Callers 1

is_unchangedMethod · 0.45

Calls 2

iterMethod · 0.45
is_changeMethod · 0.45

Tested by

no test coverage detected