ocaml-rope icon indicating copy to clipboard operation
ocaml-rope copied to clipboard

Unused `path` record field in Rope.Iterator

Open Simn opened this issue 6 years ago • 0 comments

    mutable path: (rope * int) list;
    (* path to the current leaf with global range.  First elements are
       closer to the leaf, last element is the full rope. *)

This is assigned to in make:

path = [(r, 0)]; (* the whole rope *)

However, it is never read, so at the moment it just wastes some memory. I'm assuming the idea was to utilize this in set_current_for_index_rec to have more of a bottom-up approach for finding the new leaf. I'm also assuming that this turned out to not be worth it, so the field should probably just be removed.

Simn avatar Sep 08 '19 07:09 Simn