refactor(examples): remove actix-web
This commit is contained in:
parent
ae8e601c4e
commit
2e1fbea95d
2 changed files with 1 additions and 5 deletions
|
|
@ -63,7 +63,6 @@ impl UrlVerifier for MyUrlVerifier {
|
||||||
|
|
||||||
pub enum Webserver {
|
pub enum Webserver {
|
||||||
Axum,
|
Axum,
|
||||||
ActixWeb,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FromStr for Webserver {
|
impl FromStr for Webserver {
|
||||||
|
|
@ -72,7 +71,6 @@ impl FromStr for Webserver {
|
||||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||||
Ok(match s {
|
Ok(match s {
|
||||||
"axum" => Webserver::Axum,
|
"axum" => Webserver::Axum,
|
||||||
"actix-web" => Webserver::ActixWeb,
|
|
||||||
_ => panic!("Invalid webserver parameter, must be either `axum` or `actix-web`"),
|
_ => panic!("Invalid webserver parameter, must be either `axum` or `actix-web`"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -84,7 +82,7 @@ pub fn listen(
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
match webserver {
|
match webserver {
|
||||||
Webserver::Axum => crate::axum::http::listen(config)?,
|
Webserver::Axum => crate::axum::http::listen(config)?,
|
||||||
Webserver::ActixWeb => crate::actix_web::http::listen(config)?,
|
// Webserver::ActixWeb => crate::actix_web::http::listen(config)?,
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,6 @@ use std::{env::args, str::FromStr};
|
||||||
use tracing::log::{info, LevelFilter};
|
use tracing::log::{info, LevelFilter};
|
||||||
|
|
||||||
mod activities;
|
mod activities;
|
||||||
#[cfg(feature = "actix-web")]
|
|
||||||
mod actix_web;
|
|
||||||
#[cfg(feature = "axum")]
|
#[cfg(feature = "axum")]
|
||||||
mod axum;
|
mod axum;
|
||||||
mod error;
|
mod error;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue