MCPcopy Create free account
hub / github.com/GraphiteEditor/Graphite / eq

Method eq

node-graph/graph-craft/src/proto.rs:85–99  ·  view source on GitHub ↗
(&self, other: &Self)

Source from the content-addressed store, hash-verified

83
84impl PartialEq for ConstructionArgs {
85 fn eq(&self, other: &Self) -> bool {
86 match (&self, &other) {
87 (Self::Nodes(n1), Self::Nodes(n2)) => n1 == n2,
88 (Self::Value(v1), Self::Value(v2)) => v1 == v2,
89 _ => {
90 use std::hash::Hasher;
91 let hash = |input: &Self| {
92 let mut hasher = rustc_hash::FxHasher::default();
93 input.cache_hash(&mut hasher);
94 hasher.finish()
95 };
96 hash(self) == hash(other)
97 }
98 }
99 }
100}
101
102impl CacheHash for ConstructionArgs {

Callers

nothing calls this directly

Calls 2

cache_hashMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected