From e9674a3a8b7011c244960d9c23c92549c72332a2 Mon Sep 17 00:00:00 2001 From: Antoine Riard Date: Mon, 6 Sep 2021 14:19:07 -0400 Subject: [PATCH] -f Compile --- lightning/src/util/events.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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) } -- 2.39.5