Closed andrewgazelka closed 3 months ago
Since it's not O(1) I think it could cause some surprises. Are you using .iter().len()
frequently?
Since it's not O(1) I think it could cause some surprises. Are you using
.iter().len()
frequently?
I was mostly using it to allocate a Vec
with that len in a custom allocator because there is no collect_in
unfortunately
edit: collect_into
exists; I do not believe this alias should be added anymore (at least without further reason).
thoughts?
Pro: Easier to call
.len()
Con: it could be bad if people expect it to be a simple memory lookup...