diff --git a/src/bundle/rundir.rs b/src/bundle/rundir.rs index bb791191470a01884555d61e191e8efbc00cd579..fca75078eb69b607dd91d349a90b3b811c81082f 100644 --- a/src/bundle/rundir.rs +++ b/src/bundle/rundir.rs @@ -60,7 +60,7 @@ impl RunDir { self } - /// Creates the initial RunDir. + /// Creates the initial `RunDir`. /// /// # Examples /// @@ -141,7 +141,7 @@ impl RunDir { Ok(()) } - /// Creates a subdir within the RunDir. + /// Creates a subdir within the `RunDir`. pub fn create_subdir(&self, name: &str) -> Result<PathBuf> { let pathbuf = self.validate_subdir_name(name)?; @@ -152,7 +152,7 @@ impl RunDir { Ok(pathbuf) } - /// Removes a subdir and all its contents from the RunDir. + /// Removes a subdir and all its contents from the `RunDir`. pub fn remove_subdir_all(&self, name: &str) -> Result<()> { let pathbuf = self.validate_subdir_name(name)?; @@ -161,7 +161,7 @@ impl RunDir { Ok(()) } - /// Checks if a subdir exists within the RunDir. + /// Checks if a subdir exists within the `RunDir`. pub fn subdir_exists(&self, name: &str) -> Result<bool> { let pathbuf = self.validate_subdir_name(name)?; diff --git a/src/config.rs b/src/config.rs index 8cd1edecb82d330b214f843c3cbf5e31967b787d..8031cda1ec6478ea8ff41209f9fc12cab5abb4a5 100644 --- a/src/config.rs +++ b/src/config.rs @@ -312,8 +312,8 @@ pub fn from_current_dir() -> Result<Config> { /// Similar to `from_paths`. Uses a default set of paths: /// -/// - CURRENT_WORKING_DIRECTORY/config.toml -/// - /etc/CRATE/config.toml +/// - `CURRENT_WORKING_DIRECTORY/config.toml` +/// - `/etc/CRATE/config.toml` pub fn from_default_paths() -> Result<Config> { let mut current_path = env::current_dir().context(GetCurrentDir)?; diff --git a/src/files/mod.rs b/src/files/mod.rs index a91534fd448f3027baffdf51229a2a6ebb675843..d716472a8c79e4b22f4e33a195616904676ab8f0 100644 --- a/src/files/mod.rs +++ b/src/files/mod.rs @@ -90,7 +90,7 @@ impl Files { /// /// `File` uses `ThreadPool` for blocking filesystem operations. /// By default pool with 5x threads of available cpus is used. - /// Pool size can be changed by setting ACTIX_THREADPOOL environment variable. + /// Pool size can be changed by setting `ACTIX_THREADPOOL` environment variable. #[allow(clippy::rc_buffer)] pub fn new( path: &str, diff --git a/src/lib.rs b/src/lib.rs index f42fe19a42acc31fac6f972cf5c43edd119e124a..f450b7ba06e46ddabddb67a740f771b9ddb20237 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,5 @@ #![feature(try_blocks, proc_macro_hygiene)] +#![deny(clippy::doc_markdown, clippy::match_bool, clippy::match_same_arms)] #[macro_use] extern crate log; diff --git a/src/main.rs b/src/main.rs index c707a3839c9ee2428b9258a12f9072bcb9e63b8b..1339caf3b863eb03bc7cf1b580acd495a6174ce6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,5 @@ #![feature(try_blocks, proc_macro_hygiene)] +#![deny(clippy::doc_markdown, clippy::match_bool, clippy::match_same_arms)] #[macro_use] extern crate log; diff --git a/src/stats.rs b/src/stats.rs index b374f45565b5fc9313f238579f827ff45e310d9b..2eef1e427476e004c357c7de8c9d05a65f084f22 100644 --- a/src/stats.rs +++ b/src/stats.rs @@ -109,8 +109,7 @@ async fn get_status(data: actix_web::web::Data<State>) -> impl Responder { async fn get_health(data: actix_web::web::Data<State>) -> impl Responder { match data.unbundler.get_status().await { Ok(status) => match status { - UnbundlerStatus::Ready => HttpResponse::Ok().body("Ready"), - UnbundlerStatus::Polling => HttpResponse::Ok().body("Ready"), + UnbundlerStatus::Ready | UnbundlerStatus::Polling => HttpResponse::Ok().body("Ready"), _ => HttpResponse::ServiceUnavailable().body("Not Ready"), }, Err(_) => HttpResponse::InternalServerError().body("Internal Server Error"),