(constraints: Vec<Constraint>)
| 388 | } |
| 389 | |
| 390 | fn 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] |
| 405 | fn test_dynamic_infer() -> Result<()> { |
no test coverage detected