I currently have a function that returns a (T, U)? (actual types unimportant)
I'm trying to call the function, while unwrapping the T into a mutable variable and the U into an immutable one. At the moment, I'm using
guard var (t, u) = myFunction() else { ... }
and letting u be unnecessarily mutable, which would be fine except the compiler issues a warning saying Variable 'u' was never mutated; consider changing to 'let' constant. Obviously if I change the var to a let, the usage of t will break.
Is there a way to unwrap these two variables in one line without any compiler warnings or errors? I've tried guard let (var t, u), guard (var t, let u), but they don't seem to be supported.