@@ -133,11 +133,10 @@ pub async fn process_incoming_message(data: Result<Message, Error>, uuid: &str,
133133 InboundEventType :: SendToPlugin ( _) => Ok ( ( ) ) ,
134134 InboundEventType :: SwitchProfile ( event) => misc:: switch_profile ( event) . await ,
135135 InboundEventType :: DeviceBrightness ( event) => misc:: device_brightness ( event) . await ,
136- } {
137- if !error. to_string ( ) . contains ( "closed connection" ) {
136+ }
137+ && !error. to_string ( ) . contains ( "closed connection" ) {
138138 warn ! ( "Failed to process incoming event from plugin: {}" , error) ;
139139 }
140- }
141140 }
142141}
143142
@@ -155,11 +154,10 @@ pub async fn process_incoming_message_pi(data: Result<Message, Error>, uuid: &st
155154 InboundEventType :: GetGlobalSettings ( event) => Some ( event. context . clone ( ) ) ,
156155 InboundEventType :: SendToPlugin ( event) => Some ( event. context . to_string ( ) ) ,
157156 _ => None ,
158- } {
159- if context != uuid {
157+ }
158+ && context != uuid {
160159 return ;
161160 }
162- }
163161
164162 if let Err ( error) = match decoded {
165163 InboundEventType :: SetSettings ( event) => settings:: set_settings ( event, true ) . await ,
@@ -170,10 +168,9 @@ pub async fn process_incoming_message_pi(data: Result<Message, Error>, uuid: &st
170168 InboundEventType :: LogMessage ( event) => misc:: log_message ( None , event) . await ,
171169 InboundEventType :: SendToPlugin ( event) => property_inspector:: send_to_plugin ( event) . await ,
172170 _ => Ok ( ( ) ) ,
173- } {
174- if !error. to_string ( ) . contains ( "closed connection" ) {
171+ }
172+ && !error. to_string ( ) . contains ( "closed connection" ) {
175173 warn ! ( "Failed to process incoming event from property inspector: {}" , error) ;
176174 }
177- }
178175 }
179176}
0 commit comments