mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
use VecSet in IntroducedVariables
This commit is contained in:
parent
9f453a7ba2
commit
7f3ca4458a
4 changed files with 25 additions and 17 deletions
|
@ -344,7 +344,8 @@ pub fn canonicalize_defs<'a>(
|
|||
|
||||
let mut named = can_ann.introduced_variables.named;
|
||||
for loc_lowercase in vars.iter() {
|
||||
match named.iter().position(|nv| nv.name == loc_lowercase.value) {
|
||||
let opt_index = named.iter().position(|nv| nv.name == loc_lowercase.value);
|
||||
match opt_index {
|
||||
Some(index) => {
|
||||
// This is a valid lowercase rigid var for the type def.
|
||||
let named_variable = named.swap_remove(index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue