Rewrite new() in terms of new_with_timeout()

This commit is contained in:
Michael Vines 2020-01-31 09:53:17 -07:00
parent 7d96510d17
commit 8e3a7da596
1 changed files with 1 additions and 4 deletions

View File

@ -15,10 +15,7 @@ pub struct RpcClientRequest {
impl RpcClientRequest {
pub fn new(url: String) -> Self {
Self {
client: reqwest::blocking::Client::new(),
url,
}
Self::new_with_timeout(url, Duration::from_secs(20))
}
pub fn new_with_timeout(url: String, timeout: Duration) -> Self {