From da399d3c9cfd4d8033e79a67d4043d3b3656e09a Mon Sep 17 00:00:00 2001
From: Eduardo Trujillo <ed@chromabits.com>
Date: Tue, 15 Nov 2022 10:28:39 -0800
Subject: [PATCH] style: Address additional configured clippy lints

---
 src/bundle/rundir.rs | 8 ++++----
 src/config.rs        | 4 ++--
 src/files/mod.rs     | 2 +-
 src/lib.rs           | 1 +
 src/main.rs          | 1 +
 src/stats.rs         | 3 +--
 6 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/bundle/rundir.rs b/src/bundle/rundir.rs
index bb79119..fca7507 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 8cd1ede..8031cda 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 a91534f..d716472 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 f42fe19..f450b7b 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 c707a38..1339caf 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 b374f45..2eef1e4 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"),
-- 
GitLab