Skip to content

Commit b3c060c

Browse files
committed
clippy
1 parent a05b2c5 commit b3c060c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/net_protocol.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,14 @@ impl<S: crate::store::Store> Builder<S> {
172172

173173
/// Set custom [`ConcurrencyLimits`] to use.
174174
pub fn concurrency_limits(mut self, concurrency_limits: ConcurrencyLimits) -> Self {
175-
let downloader_config = self
176-
.downloader_config
177-
.get_or_insert_with(|| Default::default());
175+
let downloader_config = self.downloader_config.get_or_insert_with(Default::default);
178176
downloader_config.concurrency = concurrency_limits;
179177
self
180178
}
181179

182180
/// Set a custom [`RetryConfig`] to use.
183181
pub fn retry_config(mut self, retry_config: RetryConfig) -> Self {
184-
let downloader_config = self
185-
.downloader_config
186-
.get_or_insert_with(|| Default::default());
182+
let downloader_config = self.downloader_config.get_or_insert_with(Default::default);
187183
downloader_config.retry = retry_config;
188184
self
189185
}

0 commit comments

Comments
 (0)