From c646d9bdd32b31affecf6b59eae9bfb55c3e6526 Mon Sep 17 00:00:00 2001 From: Ali Alimohammadi <41567902+AliAlimohammadi@users.noreply.github.com> Date: Sat, 31 Jan 2026 02:02:21 -0800 Subject: [PATCH 1/4] fix: allowing missing punctuation for clippy warnings --- src/lib.rs | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2267721cc11..32a1d29d1c1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::doc_paragraphs_missing_punctuation)] pub mod backtracking; pub mod big_integer; pub mod bit_manipulation; @@ -19,22 +20,3 @@ pub mod searching; pub mod signal_analysis; pub mod sorting; pub mod string; - -#[cfg(test)] -mod tests { - use super::sorting; - #[test] - fn quick_sort() { - //descending - let mut ve1 = vec![6, 5, 4, 3, 2, 1]; - sorting::quick_sort(&mut ve1); - - assert!(sorting::is_sorted(&ve1)); - - //pre-sorted - let mut ve2 = vec![1, 2, 3, 4, 5, 6]; - sorting::quick_sort(&mut ve2); - - assert!(sorting::is_sorted(&ve2)); - } -} From 5e17fcdc79e69ef518078308da8dbf669a58a231 Mon Sep 17 00:00:00 2001 From: Ali Alimohammadi <41567902+AliAlimohammadi@users.noreply.github.com> Date: Sat, 31 Jan 2026 02:20:51 -0800 Subject: [PATCH 2/4] fix: allowing missing punctuation for clippy warnings --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index c848f37344c..e06b115f443 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -167,6 +167,7 @@ doc_lazy_continuation = { level = "allow", priority = 1 } needless_return = { level = "allow", priority = 1 } doc_overindented_list_items = { level = "allow", priority = 1 } needless_range_loop = { level = "allow", priority = 1 } +doc_paragraphs_missing_punctuation = { level = "allow", priority = 1 } # complexity-lints precedence = { level = "allow", priority = 1 } manual_div_ceil = { level = "allow", priority = 1 } From 462d2a02626813fbe07cdd1df956275a3745aafb Mon Sep 17 00:00:00 2001 From: Ali Alimohammadi <41567902+AliAlimohammadi@users.noreply.github.com> Date: Sat, 31 Jan 2026 02:21:32 -0800 Subject: [PATCH 3/4] Update lib.rs --- src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 32a1d29d1c1..c913a5b8714 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ -#![allow(clippy::doc_paragraphs_missing_punctuation)] pub mod backtracking; pub mod big_integer; pub mod bit_manipulation; From 60730de46b296a4353883563ffe14ae239a2d4a5 Mon Sep 17 00:00:00 2001 From: Ali Alimohammadi <41567902+AliAlimohammadi@users.noreply.github.com> Date: Sat, 31 Jan 2026 02:29:08 -0800 Subject: [PATCH 4/4] fix `binary_search_tree.rs` for clippy `unwrap` warning --- src/data_structures/binary_search_tree.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data_structures/binary_search_tree.rs b/src/data_structures/binary_search_tree.rs index 05e8614ea1a..5ff05f432ea 100644 --- a/src/data_structures/binary_search_tree.rs +++ b/src/data_structures/binary_search_tree.rs @@ -212,8 +212,8 @@ where None } else { let node = self.stack.pop().unwrap(); - if node.right.is_some() { - self.stack.push(node.right.as_ref().unwrap().deref()); + if let Some(right_node) = &node.right { + self.stack.push(right_node.deref()); self.stack_push_left(); } node.value.as_ref()