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

Method new

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

Create a new change hunk. # Arguments `start` - Start byte offset (inclusive) `end` - End byte offset (exclusive) `kind` - The kind of change # Example ```rust use atomic_core::diff::inline::{ChangeHunk, HunkKind}; let hunk = ChangeHunk::new(10, 20, HunkKind::Inserted); assert_eq!(hunk.len(), 10); ```

(start: usize, end: usize, kind: HunkKind)

Source from the content-addressed store, hash-verified

204 /// assert_eq!(hunk.len(), 10);
205 /// ```
206 pub fn new(start: usize, end: usize, kind: HunkKind) -> Self {
207 Self { start, end, kind }
208 }
209
210 /// Create a deleted hunk.
211 pub fn deleted(start: usize, end: usize) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected