From: Matt Corallo Date: Sun, 31 May 2020 03:22:16 +0000 (-0400) Subject: Refer to return types by the trait that they're defined via X-Git-Tag: v0.0.12~32^2~5 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=f65765872e70bb273c7a73fc1f6bdc59fec3646d;p=rust-lightning Refer to return types by the trait that they're defined via Instead of using the explicit type which is being returned, refer to them as Self::AssociatedType, to make clear to the bindings what type of thing is being returned. --- diff --git a/lightning/src/chain/keysinterface.rs b/lightning/src/chain/keysinterface.rs index ebe7e070..dbe0a862 100644 --- a/lightning/src/chain/keysinterface.rs +++ b/lightning/src/chain/keysinterface.rs @@ -815,7 +815,7 @@ impl KeysInterface for KeysManager { self.shutdown_pubkey.clone() } - fn get_channel_keys(&self, _inbound: bool, channel_value_satoshis: u64) -> InMemoryChannelKeys { + fn get_channel_keys(&self, _inbound: bool, channel_value_satoshis: u64) -> Self::ChanKeySigner { let child_ix = self.channel_child_index.fetch_add(1, Ordering::AcqRel); let ix_and_nanos: u64 = (child_ix as u64) << 32 | (self.starting_time_nanos as u64); self.derive_channel_keys(channel_value_satoshis, ix_and_nanos, self.starting_time_secs)