georust / rstar

R*-tree spatial index for the Rust ecosystem
https://docs.rs/rstar
Apache License 2.0
414 stars 68 forks source link

Replace single `smallvec::SmallVec ` usage with `heapless::Vec` #177

Closed frewsxcv closed 3 weeks ago

frewsxcv commented 3 weeks ago

https://docs.rs/heapless/0.8.0/heapless/struct.Vec.html

We only use SmallVec in one place. What do we think about replacing that usage with heapless's Vec so don't need the extra dep?

adamreichold commented 3 weeks ago

I don't this is easily possible. SmallVec will overflow onto the heap when the fixed capacity is exhausted where heapless::Vec does not. But there is not fixed upper bound on the capacity so iterators need AFAIU.

frewsxcv commented 3 weeks ago

You're totally right. Thanks for the info