Skip to content

Refactor local iterator handling in txn.rs, removing duplicate logic#177

Open
mehrdad3301 wants to merge 1 commit into
skyzh:mainfrom
mehrdad3301:patch-2
Open

Refactor local iterator handling in txn.rs, removing duplicate logic#177
mehrdad3301 wants to merge 1 commit into
skyzh:mainfrom
mehrdad3301:patch-2

Conversation

@mehrdad3301
Copy link
Copy Markdown
Contributor

Removed unused entry assignment and streamlined local iterator usage.

Removed unused entry assignment and streamlined local iterator usage.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR simplifies transaction-range scanning by removing duplicate “advance local iterator” logic and relying on the StorageIterator::next() implementation for TxnLocalIterator to initialize its first item.

Changes:

  • Removed manual entry_to_item(iter.next()) + assignment in Transaction::scan.
  • Primed the local iterator via local_iter.next()? before constructing the merged iterator.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants