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

Function unwrap_generic_function

codegraph-kernel/src/rustlang.rs:1638–1644  ·  view source on GitHub ↗

The function a turbofish wraps: `s.get:: ` → `s.get`, `helper:: ` → `helper`; any other callee as is.

(func: Node<'_>)

Source from the content-addressed store, hash-verified

1636/// The function a turbofish wraps: `s.get::<u32>` → `s.get`,
1637/// `helper::<u8>` → `helper`; any other callee as is.
1638fn unwrap_generic_function(func: Node<'_>) -> Node<'_> {
1639 if func.kind() == "generic_function" {
1640 func.child_by_field_name("function").unwrap_or(func)
1641 } else {
1642 func
1643 }
1644}
1645
1646/// The most links a receiver chain is kept with (receiver_chain).
1647const RECEIVER_CHAIN_MAX_LINKS: usize = 16;

Callers 1

receiver_chainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected