diff --git a/src/routes/about.rs b/src/routes/about.rs index 2a632c85..5fc1ade7 100644 --- a/src/routes/about.rs +++ b/src/routes/about.rs @@ -6,8 +6,8 @@ use crate::errors::ServiceResult; pub fn init_routes(cfg: &mut web::ServiceConfig) { cfg.service( web::scope("/about") - .service(web::resource("").route(web::get().to(get_about))) - .service(web::resource("/license").route(web::get().to(get_license))), + .service(web::resource("").route(web::get().to(get))) + .service(web::resource("/license").route(web::get().to(license))), ); } @@ -29,7 +29,13 @@ const ABOUT: &str = r#" "#; -pub async fn get_about() -> ServiceResult { +/// Get About Section HTML +/// +/// # Errors +/// +/// This function will not return an error. +#[allow(clippy::unused_async)] +pub async fn get() -> ServiceResult { Ok(HttpResponse::build(StatusCode::OK) .content_type("text/html; charset=utf-8") .body(ABOUT)) @@ -63,7 +69,13 @@ const LICENSE: &str = r#" "#; -pub async fn get_license() -> ServiceResult { +/// Get the License in HTML +/// +/// # Errors +/// +/// This function will not return an error. +#[allow(clippy::unused_async)] +pub async fn license() -> ServiceResult { Ok(HttpResponse::build(StatusCode::OK) .content_type("text/html; charset=utf-8") .body(LICENSE)) diff --git a/src/routes/root.rs b/src/routes/root.rs index 69f11fd6..a11526dd 100644 --- a/src/routes/root.rs +++ b/src/routes/root.rs @@ -3,5 +3,5 @@ use actix_web::web; use crate::routes::about; pub fn init_routes(cfg: &mut web::ServiceConfig) { - cfg.service(web::scope("/").service(web::resource("").route(web::get().to(about::get_about)))); + cfg.service(web::scope("/").service(web::resource("").route(web::get().to(about::get)))); }