remove redundant closures

This commit is contained in:
daniel.eades 2023-11-16 17:36:21 +00:00 committed by Ashley Wulber
parent 6cb69bc63b
commit 3d81eb874f
4 changed files with 5 additions and 5 deletions

View file

@ -956,7 +956,7 @@ impl cosmic::Application for CosmicAppList {
} }
}) })
.on_motion(if self.dnd_offer.is_some() { .on_motion(if self.dnd_offer.is_some() {
|x, y| Message::DndMotion(x, y) Message::DndMotion
} else { } else {
|_, _| Message::Ignore |_, _| Message::Ignore
}) })

View file

@ -797,7 +797,7 @@ impl cosmic::Application for CosmicNetworkApplet {
} }
fn subscription(&self) -> Subscription<Message> { fn subscription(&self) -> Subscription<Message> {
let network_sub = network_manager_subscription(0).map(|e| Message::NetworkManagerEvent(e)); let network_sub = network_manager_subscription(0).map(Message::NetworkManagerEvent);
let timeline = self let timeline = self
.timeline .timeline
.as_subscription() .as_subscription()

View file

@ -105,7 +105,7 @@ async fn start_listening(
if let Ok(ActiveConnectionState::Deactivated) = next if let Ok(ActiveConnectionState::Deactivated) = next
.get() .get()
.await .await
.map(|p| ActiveConnectionState::from(p)) .map(ActiveConnectionState::from)
{ {
break; break;
} }

View file

@ -167,7 +167,7 @@ impl cosmic::Application for IcedWorkspacesApplet {
..button::Appearance::default() ..button::Appearance::default()
}; };
cosmic::theme::iced::Button::Custom { cosmic::theme::iced::Button::Custom {
active: Box::new(move |theme| appearence(theme)), active: Box::new(appearence),
hover: Box::new(move |theme| button::Appearance { hover: Box::new(move |theme| button::Appearance {
background: Some(Background::Color( background: Some(Background::Color(
theme.current_container().component.hover.into(), theme.current_container().component.hover.into(),
@ -184,7 +184,7 @@ impl cosmic::Application for IcedWorkspacesApplet {
..button::Appearance::default() ..button::Appearance::default()
}; };
cosmic::theme::iced::Button::Custom { cosmic::theme::iced::Button::Custom {
active: Box::new(move |theme| appearence(theme)), active: Box::new(appearence),
hover: Box::new(move |theme| button::Appearance { hover: Box::new(move |theme| button::Appearance {
background: Some(Background::Color( background: Some(Background::Color(
theme.current_container().component.hover.into(), theme.current_container().component.hover.into(),