mirror of
https://github.com/Dummi26/musicdb.git
synced 2025-03-10 14:13:53 +01:00
fix compiler errors when only gui feature enabled
This commit is contained in:
parent
f41bec1423
commit
01e59249f5
@ -214,19 +214,16 @@ fn main() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
match mode {
|
macro_rules! gui_modes {
|
||||||
#[cfg(feature = "speedy2d")]
|
() => {{
|
||||||
Mode::Gui | Mode::GuiSyncplayerLocal { .. } | Mode::GuiSyncplayerNetwork => {
|
let get_con: Arc<Mutex<musicdb_lib::server::get::Client<Box<dyn ClientIo + 'static>>>> =
|
||||||
{
|
Arc::new(Mutex::new(
|
||||||
let get_con: Arc<
|
|
||||||
Mutex<musicdb_lib::server::get::Client<Box<dyn ClientIo + 'static>>>,
|
|
||||||
> = Arc::new(Mutex::new(
|
|
||||||
musicdb_lib::server::get::Client::new(BufReader::new(Box::new(
|
musicdb_lib::server::get::Client::new(BufReader::new(Box::new(
|
||||||
TcpStream::connect(addr).expect("opening get client connection"),
|
TcpStream::connect(addr).expect("opening get client connection"),
|
||||||
)
|
) as _))
|
||||||
as _))
|
|
||||||
.expect("initializing get client connection"),
|
.expect("initializing get client connection"),
|
||||||
));
|
));
|
||||||
|
#[allow(unused_labels)]
|
||||||
'anotherifstatement: {
|
'anotherifstatement: {
|
||||||
#[cfg(feature = "playback")]
|
#[cfg(feature = "playback")]
|
||||||
if let Mode::GuiSyncplayerLocal { lib_dir } = mode {
|
if let Mode::GuiSyncplayerLocal { lib_dir } = mode {
|
||||||
@ -256,8 +253,15 @@ fn main() {
|
|||||||
#[cfg(feature = "merscfg")]
|
#[cfg(feature = "merscfg")]
|
||||||
&mers_after_db_updated_action,
|
&mers_after_db_updated_action,
|
||||||
)
|
)
|
||||||
};
|
}};
|
||||||
}
|
}
|
||||||
|
match mode {
|
||||||
|
#[cfg(feature = "speedy2d")]
|
||||||
|
#[cfg(feature = "playback")]
|
||||||
|
Mode::Gui | Mode::GuiSyncplayerLocal { .. } | Mode::GuiSyncplayerNetwork => gui_modes!(),
|
||||||
|
#[cfg(feature = "speedy2d")]
|
||||||
|
#[cfg(not(feature = "playback"))]
|
||||||
|
Mode::Gui => gui_modes!(),
|
||||||
#[cfg(feature = "playback")]
|
#[cfg(feature = "playback")]
|
||||||
Mode::SyncplayerLocal { .. } | Mode::SyncplayerNetwork => {
|
Mode::SyncplayerLocal { .. } | Mode::SyncplayerNetwork => {
|
||||||
con_thread.join().unwrap();
|
con_thread.join().unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user