Avoid enums containing references with lifetimes
[rust-lightning] / lightning / src / ln / channelmanager.rs
index 150b94d7c45a009db3149897e801d14b302d04b9..5681aeaf8477a72d91b29b1f8b85432b82756824 100644 (file)
@@ -2432,7 +2432,7 @@ where
                // If we returned an error and the `node_signer` cannot provide a signature for whatever
                // reason`, we wouldn't be able to receive inbound payments through the corresponding
                // channel.
-               let sig = self.node_signer.sign_gossip_message(msgs::UnsignedGossipMessage::ChannelUpdate(&unsigned)).unwrap();
+               let sig = self.node_signer.sign_gossip_message(msgs::UnsignedGossipMessage::ChannelUpdate(unsigned.clone())).unwrap();
 
                Ok(msgs::ChannelUpdate {
                        signature: sig,