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

Function hash

crates/ruff_python_formatter/src/comments/node_key.rs:63–67  ·  view source on GitHub ↗
(key: NodeRefEqualityKey)

Source from the content-addressed store, hash-verified

61 use std::hash::{Hash, Hasher};
62
63 fn hash(key: NodeRefEqualityKey) -> u64 {
64 let mut h = DefaultHasher::default();
65 key.hash(&mut h);
66 h.finish()
67 }
68
69 #[test]
70 fn equality() {

Callers 7

__hash__Method · 0.85
__hash__Method · 0.85
__hash__Method · 0.85
hashMethod · 0.85
hashMethod · 0.85
RUF046.pyFile · 0.85
__hash__Method · 0.85

Calls 3

defaultFunction · 0.50
hashMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected