Rewrite new() in terms of new_with_timeout()
This commit is contained in:
parent
7d96510d17
commit
8e3a7da596
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue