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

Method load

crates/ruff_python_ast/src/node_index.rs:169–174  ·  view source on GitHub ↗

Load the current value of the `AtomicNodeIndex`.

(&self)

Source from the content-addressed store, hash-verified

167
168 /// Load the current value of the `AtomicNodeIndex`.
169 pub fn load(&self) -> NodeIndex {
170 let index = NonZeroU32::new(self.0.load(Ordering::Relaxed))
171 .expect("value stored was a valid `NodeIndex`");
172
173 NodeIndex(index)
174 }
175
176 /// Set the value of the `AtomicNodeIndex`.
177 pub fn set(&self, index: NodeIndex) {

Callers 8

formatted_fileFunction · 0.45
load_astFunction · 0.45
fmtMethod · 0.45
hashMethod · 0.45
cmpMethod · 0.45
eqMethod · 0.45
cloneMethod · 0.45

Calls 2

NodeIndexClass · 0.85
expectMethod · 0.80

Tested by

no test coverage detected