Thanks)
It collects the range 0 to n (exclusive) in its return type, a Vec<u32>.
0
n
return
Vec<u32>
Here's a more explicit example:
return (0..n as u32).collect::<Vec<u32>>();
Does that answer your question?
Please explain how it works
Thanks)
It collects the range
0
ton
(exclusive) in itsreturn
type, aVec<u32>
.Here's a more explicit example:
Does that answer your question?
Please explain how it works