I wish this was valid: let (l, r) = [1u8, 2u8];
destructure into a tuple from an array: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=98aeaa156ac1fa54d24a7e2cbe1fade2 …
-
-
Or more specifically: I wish I could index into a tuple as if it were an array. I believe the in-memory representation of the two is identical. Being able to switch between the two would be useful for certain cases!
-
I think the reason for not being able to do that is (1, "123"); is a valid tuple - they allow heterogeneous types... unlike arrays.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.