Skip to content

Conversation

Julia-Garland
Copy link
Contributor

@Julia-Garland Julia-Garland commented Sep 30, 2025

Resolves #1258

  • Made has_next() pub + added doc comments
  • Added has_next() to sync cursor API
  • Added simple test

@Julia-Garland Julia-Garland marked this pull request as ready for review September 30, 2025 15:44
@Julia-Garland Julia-Garland requested a review from a team as a code owner September 30, 2025 15:44
Copy link
Contributor

@isabelatkinson isabelatkinson left a comment

Choose a reason for hiding this comment

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

just a doc suggestion! otherwise looks good

src/cursor.rs Outdated
Comment on lines 231 to 234
/// Returns true if the cursor has any additional buffered items to return and false otherwise.
///
/// This method only checks the local buffer and exhaustion state; it does not contact the
/// server.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// Returns true if the cursor has any additional buffered items to return and false otherwise.
///
/// This method only checks the local buffer and exhaustion state; it does not contact the
/// server.
/// Returns true if the cursor has any additional items to return and false otherwise.

The call to is_exhausted checks whether the server has more batches based on its last getMore response, so the "buffered" distinction isn't necessary here.

(ditto for the doc on the sync method)

Copy link
Contributor

@isabelatkinson isabelatkinson left a comment

Choose a reason for hiding this comment

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

lgtm!

@isabelatkinson isabelatkinson merged commit fa46ded into mongodb:main Oct 2, 2025
17 of 20 checks passed
@Julia-Garland Julia-Garland deleted the rust-2113 branch October 2, 2025 15:04
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.

cursor.hasNext() is not pub
2 participants