]> git.mikk.net Git - mtbl-rs/commit
Lots of WIP on new lending "Cursor" abstraction
authorChris Mikkelson <chris@mikk.net>
Fri, 2 May 2025 05:42:52 +0000 (00:42 -0500)
committerChris Mikkelson <chris@mikk.net>
Fri, 2 May 2025 05:43:32 +0000 (00:43 -0500)
commit2121678c0183e39de91d97db945a8e8a0713b908
treec69ee3ca50729a43abe2622199b8fb0c5003752d
parent480455ef8b6154dc6fdd9e8da73c90f1091a53f2
Lots of WIP on new lending "Cursor" abstraction

Added merger of cursors and of duplicates. IntoIterator implementations
for Cursors which maintain a local copy of the value modified to use
take() instead of .clone()ing values. Getting closer to zero copy.

Merger uses Ord wrappers on the cursors themselves to provide duplicate
sorting or unsorting, which removes the need to copy values to wrap them
in an ordering wrapper.

Overall, code is getting simpler with fewer copies, a win-win.
src/cursor/filter.rs
src/cursor/filtermap.rs
src/cursor/map.rs
src/cursor/merge.rs [new file with mode: 0644]
src/cursor/merger.rs [new file with mode: 0644]
src/cursor/mod.rs
src/cursor/range.rs [new file with mode: 0644]