I am creating an application in which a loop runs. During this loop a new rtree is created, and potentially something is inserted, then I run locate_within_distance on the resulting tree. The issue is that if nothing gets inserted at all, the rtree remains empty, then running locate_within_distance() panics. Here is some code to reproduce the panic
fn main() {
let mut empty_tree : RTree<[i64;3]> = RTree::new();
let all = empty_tree.locate_within_distance([0,0,0], 10);
}
I am creating an application in which a loop runs. During this loop a new rtree is created, and potentially something is inserted, then I run locate_within_distance on the resulting tree. The issue is that if nothing gets inserted at all, the rtree remains empty, then running locate_within_distance() panics. Here is some code to reproduce the panic