MCPcopy Create free account
hub / github.com/blocksecteam/rustle / lineToStruct

Function lineToStruct

utils/core.py:138–147  ·  view source on GitHub ↗
(line, impls)

Source from the content-addressed store, hash-verified

136
137
138def lineToStruct(line, impls) -> dict:
139 closestDist = sys.maxsize
140 closestStruct = {"struct": "", "trait": ""}
141 for impl in impls:
142 if line >= impl["line_number"]:
143 dist = line - impl["line_number"]
144 if dist < closestDist:
145 closestDist = dist
146 closestStruct = impl
147 return closestStruct
148
149
150def findImpl(filename, includeMod=False) -> list:

Callers 2

findFuncFunction · 0.85
unused-ret.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected