File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -165,8 +165,8 @@ impl<M: ManageConnection> Builder<M> {
165
165
///
166
166
/// Defaults to None.
167
167
#[ must_use]
168
- pub fn min_idle ( mut self , min_idle : Option < u32 > ) -> Self {
169
- self . min_idle = min_idle;
168
+ pub fn min_idle ( mut self , min_idle : impl Into < Option < u32 > > ) -> Self {
169
+ self . min_idle = min_idle. into ( ) ;
170
170
self
171
171
}
172
172
@@ -194,7 +194,8 @@ impl<M: ManageConnection> Builder<M> {
194
194
///
195
195
/// Will panic if `max_lifetime` is 0.
196
196
#[ must_use]
197
- pub fn max_lifetime ( mut self , max_lifetime : Option < Duration > ) -> Self {
197
+ pub fn max_lifetime ( mut self , max_lifetime : impl Into < Option < Duration > > ) -> Self {
198
+ let max_lifetime = max_lifetime. into ( ) ;
198
199
assert_ne ! (
199
200
max_lifetime,
200
201
Some ( Duration :: from_secs( 0 ) ) ,
@@ -215,7 +216,8 @@ impl<M: ManageConnection> Builder<M> {
215
216
///
216
217
/// Will panic if `idle_timeout` is 0.
217
218
#[ must_use]
218
- pub fn idle_timeout ( mut self , idle_timeout : Option < Duration > ) -> Self {
219
+ pub fn idle_timeout ( mut self , idle_timeout : impl Into < Option < Duration > > ) -> Self {
220
+ let idle_timeout = idle_timeout. into ( ) ;
219
221
assert_ne ! (
220
222
idle_timeout,
221
223
Some ( Duration :: from_secs( 0 ) ) ,
You can’t perform that action at this time.
0 commit comments