File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ impl ReadConcern {
81
81
/// Creates a read concern with a custom read concern level. This is present to provide forwards
82
82
/// compatibility with any future read concerns which may be added to new versions of
83
83
/// MongoDB.
84
- pub fn custom ( level : & str ) -> Self {
85
- ReadConcernLevel :: from_str ( level) . into ( )
84
+ pub fn custom ( level : impl AsRef < str > ) -> Self {
85
+ ReadConcernLevel :: from_str ( level. as_ref ( ) ) . into ( )
86
86
}
87
87
88
88
#[ cfg( test) ]
@@ -306,8 +306,8 @@ impl WriteConcern {
306
306
}
307
307
308
308
/// A `WriteConcern` with a custom acknowledgment.
309
- pub fn custom ( s : & str ) -> Self {
310
- Acknowledgment :: from ( s) . into ( )
309
+ pub fn custom ( s : impl AsRef < str > ) -> Self {
310
+ Acknowledgment :: from ( s. as_ref ( ) ) . into ( )
311
311
}
312
312
313
313
pub ( crate ) fn is_acknowledged ( & self ) -> bool {
You can’t perform that action at this time.
0 commit comments