appservice: Compile time webserver feature check

master
Johannes Becker 2021-05-10 09:04:51 +02:00
parent 87099676f9
commit 325531d13f
1 changed files with 5 additions and 9 deletions

View File

@ -51,6 +51,9 @@
//! //!
//! [Application Service]: https://matrix.org/docs/spec/application_service/r0.1.2 //! [Application Service]: https://matrix.org/docs/spec/application_service/r0.1.2
#[cfg(not(any(feature = "actix",)))]
compile_error!("one webserver feature must be enabled. available ones: `actix`");
use std::{ use std::{
convert::{TryFrom, TryInto}, convert::{TryFrom, TryInto},
fs::File, fs::File,
@ -322,14 +325,7 @@ impl Appservice {
Ok(()) Ok(())
} }
#[cfg(not(feature = "actix"))] #[cfg(not(any(feature = "actix",)))]
{ unreachable!()
error!(
"tried to bind {}:{} but no server feature activated",
host.as_ref(),
port.into()
);
unimplemented!();
}
} }
} }