Closed TonalidadeHidrica closed 4 years ago
Why we use i32
as the index type?
It'd probably more natural and convinient to use usize
as other Rust standard libraries.
I used i32
instead of usize
in favor of the original code, but I agree that this is not idiomatic in Rust. However, if we are to replace some of them, we have to now decide to what extent we have to replace them. For now, I'll follow every comments on pull request, but I will not make any modification for the first time I create a new pull request.
I changed my mind and use usize
from beginning in some places.
I added boundary check in pop
function, but wondering if this is a good idea from the viewpoint of performance. After all, this structure is only used internally.
No tests, no checks.