MCPcopy Create free account
hub / github.com/JamieMason/syncpack / add_source

Method add_source

src/sources.rs:86–90  ·  view source on GitHub ↗

Append a source to the arena and return its index. Test-only helper that bypasses `user_source_indices` bookkeeping.

(&mut self, source: Source)

Source from the content-addressed store, hash-verified

84 /// Append a source to the arena and return its index. Test-only helper
85 /// that bypasses `user_source_indices` bookkeeping.
86 pub fn add_source(&mut self, source: Source) -> SourceIdx {
87 let idx = SourceIdx(self.all.len());
88 self.all.push(source);
89 idx
90 }
91
92 /// Iterate the package.json sources only. Pnpm yaml is excluded.
93 /// Used by `format`, `find_package`, name lookups.

Callers

nothing calls this directly

Calls 1

SourceIdxClass · 0.85

Tested by

no test coverage detected