Hi all,
I have a quick question about using uint::range_rev().
I'd like to express a for statement that decrements an uint value to 0.
However I cannot use the below statement, because uint::range_rev(i,j) computes
values in the range [i,j).
for uint::range_rev(10,0) |i| {
// do something
}
Sure I can express the statement using a combination of a while loop and an if
statment,
but is there a compact (or Rust) way of expressing i,..,j? Also, I think type
casting to int, use int::range(i,-1),
and type cast back to uint is only tricking the compiler.
Thanks a lot.
Regards,
Ryan
----
Ryan Hyun Choi
Senior Engineer
Web Platform Lab.
Software R&D Center
Samsung Electronics Co., Ltd
email: [email protected]
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev