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

Method new

atomic-core/src/change/local.rs:73–78  ·  view source on GitHub ↗

Create a new local context. # Arguments `path` - The file path relative to repository root `line` - The line number (1-indexed) # Examples ```rust use atomic_core::change::Local; let local = Local::new("src/lib.rs", 100); assert_eq!(local.path, "src/lib.rs"); assert_eq!(local.line, 100); ```

(path: impl Into<String>, line: u64)

Source from the content-addressed store, hash-verified

71 /// assert_eq!(local.line, 100);
72 /// ```
73 pub fn new(path: impl Into<String>, line: u64) -> Self {
74 Self {
75 path: path.into(),
76 line,
77 }
78 }
79
80 /// Create a local context from a Path.
81 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected