remove redundant clones

This commit is contained in:
daniel.eades 2023-11-16 18:24:47 +00:00 committed by Ashley Wulber
parent e9af664888
commit b472a155fc
7 changed files with 13 additions and 15 deletions

View file

@ -11,9 +11,9 @@ pub fn active_conns_subscription<I: 'static + Hash + Copy + Send + Sync + Debug>
id: I,
conn: Connection,
) -> iced::Subscription<NetworkManagerEvent> {
let initial = State::Continue(conn.clone());
let initial = State::Continue(conn);
subscription::channel(id, 50, move |mut output| {
let mut state = initial.clone();
let mut state = initial;
async move {
loop {

View file

@ -12,7 +12,7 @@ pub fn devices_subscription<I: 'static + Hash + Copy + Send + Sync + Debug>(
has_popup: bool,
conn: Connection,
) -> iced::Subscription<NetworkManagerEvent> {
let initial = State::Continue(conn.clone());
let initial = State::Continue(conn);
subscription::channel((id, has_popup), 50, move |mut output| {
let mut state = initial.clone();

View file

@ -11,9 +11,9 @@ pub fn wireless_enabled_subscription<I: 'static + Hash + Copy + Send + Sync + De
id: I,
conn: Connection,
) -> iced::Subscription<NetworkManagerEvent> {
let initial = State::Continue(conn.clone());
let initial = State::Continue(conn);
subscription::channel(id, 50, move |mut output| {
let mut state = initial.clone();
let mut state = initial;
async move {
loop {