In [ ]:
:timing
:sccache 1
Tips¶
- A Tuple in Rust can have up to 12 elements.
Tips and Traps¶
- Module std::collections has a good summary on when to each which collection in Rust.
Unpacking Variables (Multiple Assignments)¶
You can do multiple assignments simialarly as what you can do in Python.
In [2]:
let t = ("how", 1);
In [3]:
t.0
Out[3]:
In [4]:
t.1
Out[4]:
In [2]:
let(v1, v2) = ("how", 1)
In [3]:
v1
Out[3]:
In [4]:
v2
Out[4]:
In [ ]: