MCPcopy Create free account
hub / github.com/GCWing/BitFun / normalize_skill_key_list

Function normalize_skill_key_list

src/apps/desktop/src/api/skill_api.rs:228–245  ·  view source on GitHub ↗
(keys: Vec<String>)

Source from the content-addressed store, hash-verified

226}
227
228fn normalize_skill_key_list(keys: Vec<String>) -> Vec<String> {
229 let mut seen = HashSet::new();
230 let mut normalized = Vec::new();
231
232 for key in keys {
233 let trimmed = key.trim();
234 if trimmed.is_empty() {
235 continue;
236 }
237
238 let owned = trimmed.to_string();
239 if seen.insert(owned.clone()) {
240 normalized.push(owned);
241 }
242 }
243
244 normalized
245}
246
247async fn persist_user_mode_skill_selection(
248 mode_id: &str,

Callers 2

normalize_skill_keysFunction · 0.85

Calls 5

trimMethod · 0.80
is_emptyMethod · 0.45
insertMethod · 0.45
cloneMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected