From: Antoine Riard Date: Mon, 6 Sep 2021 18:19:07 +0000 (-0400) Subject: -f Compile X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=e9674a3a8b7011c244960d9c23c92549c72332a2;p=rust-lightning -f Compile --- diff --git a/lightning/src/util/events.rs b/lightning/src/util/events.rs index 587291c10..43182c1dd 100644 --- a/lightning/src/util/events.rs +++ b/lightning/src/util/events.rs @@ -437,13 +437,10 @@ impl MaybeReadable for Event { // Versions prior to 0.0.100 did not ignore odd types, instead returning InvalidValue. x if x % 2 == 1 => Ok(None), 6u8 => { - let f = || { - let channel_id = Readable::read(reader)?; - let err = Readable::read(reader)?; - read_tlv_fields!(reader, {}); - Ok(Some(Event::ChannelClosed { channel_id, err})) - }; - f() + let channel_id = Readable::read(reader)?; + let err = Readable::read(reader)?; + read_tlv_fields!(reader, {}); + Ok(Some(Event::ChannelClosed { channel_id, err})) }, _ => Err(msgs::DecodeError::InvalidValue) }