1 parent 6e7623c commit 588b488Copy full SHA for 588b488
1 file changed
server/src/server.rs
@@ -87,15 +87,12 @@ impl PlayerStats {
87
88
fn main() -> Result<()> {
89
#[cfg(target_os = "macos")]
90
- return termusicplayback::macos::run_with_run_loop(|| {
91
- let rt = tokio::runtime::Runtime::new()?;
92
- rt.block_on(actual_main())
93
- });
+ return termusicplayback::macos::run_with_run_loop(actual_main);
94
95
#[cfg(not(target_os = "macos"))]
96
{
97
98
- let res = rt.block_on(actual_main());
+ let res = actual_main();
+
99
trace!("Tokio Exited");
100
101
if let Err(err) = res {
@@ -107,6 +104,7 @@ fn main() -> Result<()> {
107
104
}
108
105
109
106
+#[tokio::main]
110
async fn actual_main() -> Result<()> {
111
let args = cli::Args::parse();
112
let _ = logger::setup(&args);
0 commit comments