Avoid enums containing references with lifetimes
[rust-lightning] / lightning / src / ln / channelmanager.rs
index 25c5a35fded29cc34193353ef990fc163a7a615c..a926b889d649495f67cce7d3fc8d9d55a3a35d5b 100644 (file)
@@ -3345,7 +3345,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,