@@ -561,7 +561,6 @@ pub struct ChannelDetails {
561561}
562562
563563impl From < LdkChannelDetails > for ChannelDetails {
564- #[ allow( clippy:: unwrap_used) ]
565564 fn from ( value : LdkChannelDetails ) -> Self {
566565 ChannelDetails {
567566 channel_id : value. channel_id ,
@@ -574,9 +573,9 @@ impl From<LdkChannelDetails> for ChannelDetails {
574573 channel_value_sats : value. channel_value_satoshis ,
575574 unspendable_punishment_reserve : value. unspendable_punishment_reserve ,
576575 user_channel_id : UserChannelId ( value. user_channel_id ) ,
577- // unwrap safety: This value will be `None` for objects serialized with LDK versions
578- // prior to 0.0.115.
579- feerate_sat_per_1000_weight : value . feerate_sat_per_1000_weight . unwrap ( ) ,
576+ feerate_sat_per_1000_weight : value
577+ . feerate_sat_per_1000_weight
578+ . expect ( "ldk-node v0.1.0 already required rust-lightning 0.0.115 feerate details" ) ,
580579 outbound_capacity_msat : value. outbound_capacity_msat ,
581580 inbound_capacity_msat : value. inbound_capacity_msat ,
582581 confirmations_required : value. confirmations_required ,
@@ -609,11 +608,14 @@ impl From<LdkChannelDetails> for ChannelDetails {
609608 next_outbound_htlc_limit_msat : value. next_outbound_htlc_limit_msat ,
610609 next_outbound_htlc_minimum_msat : value. next_outbound_htlc_minimum_msat ,
611610 force_close_spend_delay : value. force_close_spend_delay ,
612- // unwrap safety: This field is only `None` for objects serialized prior to LDK 0.0.107
613- inbound_htlc_minimum_msat : value. inbound_htlc_minimum_msat . unwrap_or ( 0 ) ,
611+ inbound_htlc_minimum_msat : value. inbound_htlc_minimum_msat . expect (
612+ "ldk-node v0.1.0 already required rust-lightning 0.0.115 inbound HTLC minimums" ,
613+ ) ,
614614 inbound_htlc_maximum_msat : value. inbound_htlc_maximum_msat ,
615- // unwrap safety: `config` is only `None` for LDK objects serialized prior to 0.0.109.
616- config : value. config . map ( |c| c. into ( ) ) . unwrap ( ) ,
615+ config : value
616+ . config
617+ . map ( |c| c. into ( ) )
618+ . expect ( "ldk-node v0.1.0 already required rust-lightning 0.0.115 channel config" ) ,
617619 }
618620 }
619621}
0 commit comments