almost-swapped Disallow assignments that overwrite a value before swapping it left = right; right = left assigns the original right value to both places because the first assignment overwrites the original left value. Instead, you SHOULD assign the reversed tuple to both places in parallel. - Category: suspicious - Level: warning - Fix: none - Scope: module Reported function exchange(pair: { left: int32; right: int32 }): void { pair.left = pair.right; pair.right = pair.left; } Accepted function exchange(pair: { left: int32; right: int32 }): void { (pair.left, pair.right) = (pair.right, pair.left); } Prior art - Clippy ยท almostswapped language/linter/src/rules/suspicious/almostswapped.rs:6