Skip to content

Conversation

@norareidy
Copy link
Collaborator

@norareidy norareidy commented Jan 8, 2024

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-35346
Staging - https://preview-mongodbnorareidy.gatsbyjs.io/rust/DOCSP-35346-parse-method/

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?

Copy link
Collaborator

@jordan-smith721 jordan-smith721 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 couple clarifying questions

// Replace the placeholder with your Atlas connection string
let uri = "<connection string>";
let mut client_options = ClientOptions::parse(uri)?;
let mut client_options = ClientOptions::parse_async(uri)?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Question: I noticed this is in the connection-sync file and doesn't have .await?, should this stay as just parse?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for catching - yes I meant to leave as is for all the sync files! So this can stay as parse()

let uri = "<connection string>";
// start-stable-api-behavior
let mut client_options = ClientOptions::parse(uri)?;
let mut client_options = ClientOptions::parse_async(uri)?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar question to above, since there is no await here, should it stay parse instead? Or maybe add the await call?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is also a sync file so you're right, this can stay parse()

fn main() -> mongodb::error::Result<()> {
let uri = "<connection string>";
let mut client_options = ClientOptions::parse(uri)?;
let mut client_options = ClientOptions::parse_async(uri)?;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same question as above, since there is no await here, should it stay parse instead? Or maybe add the await call?

Copy link
Collaborator

@jordan-smith721 jordan-smith721 left a comment

Choose a reason for hiding this comment

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

LGTM!

@norareidy norareidy merged commit 9cc0cca into mongodb:master Jan 8, 2024
@norareidy norareidy deleted the DOCSP-35346-parse-method branch January 8, 2024 20:52
norareidy added a commit that referenced this pull request Jan 8, 2024
norareidy added a commit that referenced this pull request Jan 8, 2024
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