]> git.mikk.net Git - mtbl-rs/commit
Modify filter_map to only map values
authorChris Mikkelson <cmikk@fsi.io>
Mon, 29 Apr 2024 01:44:00 +0000 (20:44 -0500)
committerChris Mikkelson <cmikk@fsi.io>
Mon, 29 Apr 2024 01:44:00 +0000 (20:44 -0500)
commit3f0e91a735ed70b37f645c6313725d55295af619
tree0959f0c7eaa97b31daf270403eea450c9bf3912d
parentca38edeb537746d1ff4dc0b1f3e5386c826fa54e
Modify filter_map to only map values

Mapping keys requires a conversion on seek from the
mapped key to the inner key. Since the keys are passed
to seek by reference to avoid moves, this complicates
consuming the key for a full conversion to the inner
key.

For now, restrict mapping to values only. This required
changing the filter function signature to take a reference
to the key so its caller could retain the key for returning.
src/seekable.rs
src/seekable/filter_map.rs