JSAbrahams / mamba

🐍 The Mamba programming language, because we care about safety
MIT License
88 stars 4 forks source link

Big Clippy sweep #232

Closed JSAbrahams closed 2 years ago

JSAbrahams commented 2 years ago

This should also mean that clippy behaves at it should in future PR's (See #231),

Supposedly the behavior of the code-base has changed in some areas as we were using references where we should have been using values:

for pair in names.iter().cloned().zip_longest(elements.iter()) {
    match &pair {
        Both(name, exp) => {
            let expect = Expect::Type { name: name.clone() };
            let l_ty = Expected::new(&left.pos, &expect);
            constraints.push("tuple", &l_ty, &exp)
        }
}

However, no tests have caught this change in behaviour.