This is achieved via the collect() method: let my_vec: Vec = (0..10).collect(); ... This can be seen in the source example supplied with this book.
確定! 回上一頁