diff --git a/ethers-contract/src/contract.rs b/ethers-contract/src/contract.rs index de909145..1202c0e5 100644 --- a/ethers-contract/src/contract.rs +++ b/ethers-contract/src/contract.rs @@ -261,13 +261,11 @@ impl Contract { /// /// Clones `self` internally #[must_use] - pub fn connect(&self, client: Arc) -> Self + pub fn connect(&self, client: Arc) -> Contract where - M: Clone, + N: Clone, { - let mut this = self.clone(); - this.client = client; - this + Contract { base_contract: self.base_contract.clone(), client, address: self.address } } /// Returns the contract's address