reth icon indicating copy to clipboard operation
reth copied to clipboard

`Cursor::into_iter` should take `self` by value

Open DaniPopes opened this issue 1 year ago • 1 comments

Describe the feature

Cursor::into_iter borrows &self instead of taking it by value. This goes against common practice of into* methods taking self by value and thus can result in unnecessary clones since it clones internally.

https://github.com/paradigmxyz/reth/blob/6d57b9eaac0c093feb453f8f4d2bef90e28e8993/crates/storage/libmdbx-rs/src/cursor.rs#L67-L75

Additional context

No response

DaniPopes avatar Sep 30 '24 16:09 DaniPopes