MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / rustImplAt

Function rustImplAt

src/resolution/rust-scopes.ts:710–716  ·  view source on GitHub ↗
(scopes: RustScopes, offset: number)

Source from the content-addressed store, hash-verified

708
709/** The innermost `impl` or `trait` body around `offset`, if any. */
710export function rustImplAt(scopes: RustScopes, offset: number): RustImplBlock | undefined {
711 let best: RustImplBlock | undefined;
712 for (const b of scopes.impls) {
713 if (offset > b.from && offset < b.to && (!best || b.from > best.from)) best = b;
714 }
715 return best;
716}
717
718/** `text` parted at its top-level `sep`s, outside `()`, `[]`, `{}` and `<>` (`->` closes nothing). */
719export function splitRustTopLevel(text: string, sep: string): string[] {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected