Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUST-945 Check that explicit sessions were created on the correct client #405

Merged
merged 1 commit into from
Aug 2, 2021

Conversation

isabelatkinson
Copy link
Contributor

No description provided.

@@ -72,6 +72,15 @@ impl Client {
}
match session.into() {
Some(session) => {
if !Arc::ptr_eq(&self.inner, &session.client().inner) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't have PartialEq derived for Client (and it wouldn't make much sense to do so), so this verifies that the inner fields on both the clients point to the same data.

Copy link
Contributor

@NBSquare NBSquare 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 77b6f01 into mongodb:master Aug 2, 2021
@isabelatkinson isabelatkinson deleted the RUST-945 branch August 2, 2021 14:42
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.

None yet

4 participants