MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / dedup_constraint

Function dedup_constraint

src/program/infer/dynamic_infer.rs:390–402  ·  view source on GitHub ↗
(constraints: Vec<Constraint>)

Source from the content-addressed store, hash-verified

388}
389
390fn dedup_constraint(constraints: Vec<Constraint>) -> Vec<Constraint> {
391 let mut new = Vec::new();
392 let mut set = Vec::new();
393 for constraint in constraints {
394 let arg = constraint.get_integer_arg();
395 if set.contains(&arg) {
396 continue;
397 }
398 new.push(constraint);
399 set.push(arg);
400 }
401 new
402}
403
404#[test]
405fn test_dynamic_infer() -> Result<()> {

Callers 1

inferFunction · 0.85

Calls 2

get_integer_argMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected