MCPcopy Index your code
hub / github.com/askanium/rustplotlib / extract_keys

Method extract_keys

src/views/scatter.rs:131–143  ·  view source on GitHub ↗

Extract the list of keys to use when stacking and coloring the bars.

(data: &Vec<impl PointDatum<T, U>>)

Source from the content-addressed store, hash-verified

129
130 /// Extract the list of keys to use when stacking and coloring the bars.
131 fn extract_keys(data: &Vec<impl PointDatum<T, U>>) -> Vec<String> {
132 let mut keys = Vec::new();
133 let mut map = HashMap::new();
134
135 for datum in data.iter() {
136 match map.insert(datum.get_key(), 0) {
137 Some(_) => {},
138 None => keys.push(datum.get_key()),
139 }
140 }
141
142 keys
143 }
144
145}
146

Callers

nothing calls this directly

Calls 1

get_keyMethod · 0.80

Tested by

no test coverage detected