Skip to content

Commit c392cab

Browse files
committed
Format get_num_conns
1 parent 214efdf commit c392cab

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/pool.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,9 @@ impl PoolBuilder {
165165
}
166166

167167
fn get_num_conns(&self) -> NonZeroUsize {
168-
self.num_conns.unwrap_or_else(|| {
169-
available_parallelism()
170-
.unwrap_or_else(|_| NonZeroUsize::new(1).unwrap())
171-
})
168+
self
169+
.num_conns
170+
.unwrap_or_else(|| available_parallelism().unwrap_or_else(|_| NonZeroUsize::new(1).unwrap()))
172171
}
173172
}
174173

0 commit comments

Comments
 (0)