From 462d9c511ad96cd2270d44bada243d981d5891e3 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sun, 25 Jun 2023 09:18:20 +0200 Subject: update all of the rusty stuff. also fixed webrtc build problems --- client-native-gui/Cargo.toml | 12 ++++++------ client-native-gui/src/main.rs | 7 +++---- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'client-native-gui') diff --git a/client-native-gui/Cargo.toml b/client-native-gui/Cargo.toml index 4829547..119cabd 100644 --- a/client-native-gui/Cargo.toml +++ b/client-native-gui/Cargo.toml @@ -6,16 +6,16 @@ edition = "2021" [dependencies] client-native-lib = { path = "../client-native-lib" } -clap = { version = "4.1.6", features = ["derive"] } +clap = { version = "4.3.8", features = ["derive"] } async-std = "1.12.0" -tokio = { version = "1.25.0", features = ["full"] } +tokio = { version = "1.28.2", features = ["full"] } env_logger = "0.10.0" log = "0.4" -anyhow = "1.0.69" -crossbeam-channel = "0.5.6" +anyhow = "1.0.71" +crossbeam-channel = "0.5.8" -egui = "0.21.0" -eframe = "0.21.3" +egui = "0.22.0" +eframe = "0.22.0" libmpv = { git = "https://github.com/sirno/libmpv-rs.git", branch = "upgrade-libmpv" } diff --git a/client-native-gui/src/main.rs b/client-native-gui/src/main.rs index f0c3a9f..fb78947 100644 --- a/client-native-gui/src/main.rs +++ b/client-native-gui/src/main.rs @@ -3,7 +3,6 @@ which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2022 metamuffin */ -#![feature(box_syntax)] pub mod chat; @@ -361,7 +360,7 @@ impl EventHandler for Handler { } pub fn play(peer: Arc, track: Arc) { - let rid = block_on(track.stream_id()); + let rid = track.stream_id(); let (exit_tx, exit_rx) = crossbeam_channel::unbounded(); let has_exited = Arc::new(AtomicBool::new(false)); let buffer = Arc::new(RwLock::new(VecDeque::new())); @@ -460,11 +459,11 @@ pub fn play(peer: Arc, track: Arc) { .unwrap(); mpv.command("show-text", &[&uri, "2000"]).unwrap(); - block_on(track.onmute(move || { + track.onmute(move || { debug!("track muted"); let _ = exit_tx.send(()); Box::pin(async move {}) - })); + }); exit_rx.recv().unwrap(); has_exited.store(true, Ordering::Relaxed); block_on(peer.request_stop_resource(rid)) -- cgit v1.2.3-70-g09d2