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-1810 Clean up concern helpers #1011

Merged
merged 3 commits into from
Jan 18, 2024

Conversation

abr-egn
Copy link
Contributor

@abr-egn abr-egn commented Jan 18, 2024

No description provided.

@abr-egn abr-egn marked this pull request as ready for review January 18, 2024 20:30
src/concern.rs Outdated
@@ -104,8 +81,8 @@ impl ReadConcern {
/// Creates a read concern with a custom read concern level. This is present to provide forwards
/// compatibility with any future read concerns which may be added to new versions of
/// MongoDB.
pub fn custom(level: String) -> Self {
ReadConcernLevel::from_str(level.as_str()).into()
pub fn custom(level: &str) -> Self {
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
pub fn custom(level: &str) -> Self {
pub fn custom(level: impl AsRef<str>) -> Self {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

src/concern.rs Outdated
}

/// A `WriteConcern` with a custom acknowledgment.
pub fn custom(s: &str) -> Self {
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
pub fn custom(s: &str) -> Self {
pub fn custom(s: impl AsRef<str>) -> Self {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@abr-egn abr-egn merged commit 6f48d65 into mongodb:main Jan 18, 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