You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is both unnecessary and makes it hard to make helper functions that return iterators using these functions. In my current project I want a function to calculate an AABB and return a Box<dyn Iterator<Item = &SomeType>>. But because the envelope is taken by reference I now need to also store the AABB with the same lifetime.
Instead I propose that these functions take ownership of the envelope.
The text was updated successfully, but these errors were encountered:
A lot of functions currently take a
T::Envelope
by reference, and then immediately clones it. For examplelocate_in_envelope
:rstar/rstar/src/rtree.rs
Line 336 in c1b704d
This is both unnecessary and makes it hard to make helper functions that return iterators using these functions. In my current project I want a function to calculate an AABB and return a
Box<dyn Iterator<Item = &SomeType>>
. But because the envelope is taken by reference I now need to also store the AABB with the same lifetime.Instead I propose that these functions take ownership of the envelope.
The text was updated successfully, but these errors were encountered: