]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Refer to return types by the trait that they're defined via
authorMatt Corallo <git@bluematt.me>
Sun, 31 May 2020 03:22:16 +0000 (23:22 -0400)
committerMatt Corallo <git@bluematt.me>
Tue, 25 Aug 2020 21:09:51 +0000 (17:09 -0400)
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.

lightning/src/chain/keysinterface.rs

index ebe7e0701563e95f5cb5a4b51ede3403f1aa70d4..dbe0a8621ce851aab3a55ce25fcfd74658ff45a7 100644 (file)
@@ -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)