Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
hash
Method · 0.85
hash
Method · 0.85
RUF046.py
File · 0.85
__hash__
Method · 0.85
Calls
3
default
Function · 0.50
hash
Method · 0.45
finish
Method · 0.45
Tested by
no test coverage detected