MCPcopy Create free account
hub / github.com/MarcusRainbow/QuantMath / dedup_map_from_slice

Function dedup_map_from_slice

src/core/dedup.rs:301–313  ·  view source on GitHub ↗

Utility function to convert a slice of objects that support InstanceId into a HashMap. We do this rather than using a HashSet and relying on the object's own equality and hash methods, because we do not want to force every user of dedup to apply equality and hash only to its id.

(slice: &[Drc<T, R>])

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

instrument_from_jsonFunction · 0.85

Calls 3

idMethod · 0.45
insertMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected