-
Notifications
You must be signed in to change notification settings - Fork 171
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
Conversation
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub fn custom(level: &str) -> Self { | |
pub fn custom(level: impl AsRef<str>) -> Self { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub fn custom(s: &str) -> Self { | |
pub fn custom(s: impl AsRef<str>) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
No description provided.