mirror of
https://github.com/openharmony/third_party_rust_reqwest.git
synced 2026-07-21 04:05:26 -04:00
Added dns_threads setter to sync ClientBuilder (#381)
This commit is contained in:
committed by
Sean McArthur
parent
3efc33d37a
commit
6a7a081da6
@@ -262,6 +262,13 @@ impl ClientBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
/// Set the number of threads to use for DNS
|
||||
///
|
||||
/// Default is 4
|
||||
pub fn dns_threads(self, threads: usize) -> ClientBuilder {
|
||||
self.with_inner(|inner| inner.dns_threads(threads))
|
||||
}
|
||||
|
||||
fn with_inner<F>(mut self, func: F) -> ClientBuilder
|
||||
where
|
||||
F: FnOnce(async_impl::ClientBuilder) -> async_impl::ClientBuilder,
|
||||
|
||||
Reference in New Issue
Block a user