mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-19 19:34:24 +02:00
refactor: remove unnecessary intermediate variable
This commit is contained in:
parent
8d0560e9ce
commit
59a5166eff
1 changed files with 2 additions and 3 deletions
|
@ -37,12 +37,11 @@ impl Module<gtk::Box> for NetworkManagerModule {
|
||||||
_: Receiver<()>,
|
_: Receiver<()>,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
let client = context.client::<Client>();
|
let client = context.client::<Client>();
|
||||||
let client_signal = client.subscribe();
|
let mut client_signal = client.subscribe().to_stream();
|
||||||
let mut client_signal_stream = client_signal.to_stream();
|
|
||||||
let widget_transmitter = context.tx.clone();
|
let widget_transmitter = context.tx.clone();
|
||||||
|
|
||||||
spawn(async move {
|
spawn(async move {
|
||||||
while let Some(state) = client_signal_stream.next().await {
|
while let Some(state) = client_signal.next().await {
|
||||||
send_async!(widget_transmitter, ModuleUpdateEvent::Update(state));
|
send_async!(widget_transmitter, ModuleUpdateEvent::Update(state));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue