MCPcopy Create free account
hub / github.com/astral-sh/ruff / from_node

Method from_node

crates/ty_python_core/src/node_key.rs:15–20  ·  view source on GitHub ↗
(node: N)

Source from the content-addressed store, hash-verified

13 }
14
15 pub fn from_node<N>(node: N) -> Self
16 where
17 N: HasNodeIndex,
18 {
19 NodeKey(node.node_index().load())
20 }
21
22 pub(crate) fn from_node_ref<T>(node_ref: &AstNodeRef<T>) -> Self {
23 NodeKey(node_ref.index())

Callers

nothing calls this directly

Calls 3

NodeKeyClass · 0.85
loadMethod · 0.45
node_indexMethod · 0.45

Tested by

no test coverage detected