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

Method is_adjacent_to

atomic-core/src/diff/inline.rs:257–259  ·  view source on GitHub ↗

Check if this hunk is adjacent to another hunk. Two hunks are adjacent if one ends where the other begins.

(&self, other: &Self)

Source from the content-addressed store, hash-verified

255 ///
256 /// Two hunks are adjacent if one ends where the other begins.
257 pub fn is_adjacent_to(&self, other: &Self) -> bool {
258 self.end == other.start || other.end == self.start
259 }
260
261 /// Try to merge with another hunk of the same kind.
262 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected