contract: return `Arc<M>` instead of `&M` (#1731)
* return Arc<M> instead of &M * docs
This commit is contained in:
parent
d655d22125
commit
4ed46089d8
|
@ -185,9 +185,9 @@ impl<M> Contract<M> {
|
||||||
&self.base_contract.abi
|
&self.base_contract.abi
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a reference to the contract's client
|
/// Returns a pointer to the contract's client
|
||||||
pub fn client(&self) -> &M {
|
pub fn client(&self) -> Arc<M> {
|
||||||
&self.client
|
self.client.clone()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,8 +147,8 @@ impl<M: Middleware, C: From<Contract<M>>> ContractDeployer<M, C> {
|
||||||
self.deployer.abi()
|
self.deployer.abi()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a reference to the deployer's client
|
/// Returns a pointer to the deployer's client
|
||||||
pub fn client(&self) -> &M {
|
pub fn client(&self) -> Arc<M> {
|
||||||
self.deployer.client()
|
self.deployer.client()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -261,9 +261,9 @@ impl<M: Middleware> Deployer<M> {
|
||||||
&self.abi
|
&self.abi
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a reference to the deployer's client
|
/// Returns a pointer to the deployer's client
|
||||||
pub fn client(&self) -> &M {
|
pub fn client(&self) -> Arc<M> {
|
||||||
&self.client
|
self.client.clone()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue