From 33ae302c70c37d0575de9b54eb86d3b7beb64e3c Mon Sep 17 00:00:00 2001 From: Davy Duperron Date: Mon, 25 May 2026 14:44:05 +0200 Subject: [PATCH] fix: drop unused imports --- Cargo.toml | 1 + src/core/hyperedges/clear_hyperedges.rs | 9 +-------- src/core/hyperedges/contract_hyperedge_vertices.rs | 9 +-------- src/core/hyperedges/find_hyperedges_by_weight.rs | 10 +++------- src/core/hyperedges/get_hyperedges_connecting.rs | 9 +-------- src/core/hyperedges/get_hyperedges_intersections.rs | 9 +-------- src/core/hyperedges/join_hyperedges.rs | 9 +-------- src/core/hyperedges/retain_hyperedges.rs | 9 +-------- src/core/vertices/retain_vertices.rs | 9 +-------- 9 files changed, 11 insertions(+), 63 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f65eca7..9bc8cb1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,6 +43,7 @@ nonstandard_style = { level = "deny", priority= -1 } rust_2024_compatibility = { level = "forbid", priority= -1 } unreachable_pub = "warn" unsafe_code = "deny" +unused_imports = "deny" [lints.clippy] pedantic = { level = "deny", priority = -1 } diff --git a/src/core/hyperedges/clear_hyperedges.rs b/src/core/hyperedges/clear_hyperedges.rs index aa85037..35e9c1e 100644 --- a/src/core/hyperedges/clear_hyperedges.rs +++ b/src/core/hyperedges/clear_hyperedges.rs @@ -28,14 +28,7 @@ where #[cfg(test)] mod tests { - use crate::{ - Hypergraph, - core::test_support::{ - E, - W, - build, - }, - }; + use crate::core::test_support::build; #[test] fn clears_all_hyperedges_keeps_vertices() { diff --git a/src/core/hyperedges/contract_hyperedge_vertices.rs b/src/core/hyperedges/contract_hyperedge_vertices.rs index 95ecfe2..0d59402 100644 --- a/src/core/hyperedges/contract_hyperedge_vertices.rs +++ b/src/core/hyperedges/contract_hyperedge_vertices.rs @@ -96,14 +96,7 @@ where #[cfg(test)] mod tests { - use crate::{ - Hypergraph, - core::test_support::{ - E, - W, - build, - }, - }; + use crate::core::test_support::build; #[test] fn contracts_vertices() { diff --git a/src/core/hyperedges/find_hyperedges_by_weight.rs b/src/core/hyperedges/find_hyperedges_by_weight.rs index 0789850..9b71f37 100644 --- a/src/core/hyperedges/find_hyperedges_by_weight.rs +++ b/src/core/hyperedges/find_hyperedges_by_weight.rs @@ -24,13 +24,9 @@ where #[cfg(test)] mod tests { - use crate::{ - Hypergraph, - core::test_support::{ - E, - W, - build, - }, + use crate::core::test_support::{ + E, + build, }; #[test] diff --git a/src/core/hyperedges/get_hyperedges_connecting.rs b/src/core/hyperedges/get_hyperedges_connecting.rs index 5370d5c..7feb4f2 100644 --- a/src/core/hyperedges/get_hyperedges_connecting.rs +++ b/src/core/hyperedges/get_hyperedges_connecting.rs @@ -41,14 +41,7 @@ where #[cfg(test)] mod tests { - use crate::{ - Hypergraph, - core::test_support::{ - E, - W, - build, - }, - }; + use crate::core::test_support::build; #[test] fn finds_connecting_hyperedge() { diff --git a/src/core/hyperedges/get_hyperedges_intersections.rs b/src/core/hyperedges/get_hyperedges_intersections.rs index 8798602..d9a9145 100644 --- a/src/core/hyperedges/get_hyperedges_intersections.rs +++ b/src/core/hyperedges/get_hyperedges_intersections.rs @@ -58,14 +58,7 @@ where #[cfg(test)] mod tests { - use crate::{ - Hypergraph, - core::test_support::{ - E, - W, - build, - }, - }; + use crate::core::test_support::build; #[test] fn returns_common_vertices() { diff --git a/src/core/hyperedges/join_hyperedges.rs b/src/core/hyperedges/join_hyperedges.rs index 812fe11..b2c7a80 100644 --- a/src/core/hyperedges/join_hyperedges.rs +++ b/src/core/hyperedges/join_hyperedges.rs @@ -63,14 +63,7 @@ where #[cfg(test)] mod tests { - use crate::{ - Hypergraph, - core::test_support::{ - E, - W, - build, - }, - }; + use crate::core::test_support::build; #[test] fn joins_two_hyperedges() { diff --git a/src/core/hyperedges/retain_hyperedges.rs b/src/core/hyperedges/retain_hyperedges.rs index ce321bf..6a32a09 100644 --- a/src/core/hyperedges/retain_hyperedges.rs +++ b/src/core/hyperedges/retain_hyperedges.rs @@ -34,14 +34,7 @@ where #[cfg(test)] mod tests { - use crate::{ - Hypergraph, - core::test_support::{ - E, - W, - build, - }, - }; + use crate::core::test_support::build; #[test] fn retains_matching_removes_rest() { diff --git a/src/core/vertices/retain_vertices.rs b/src/core/vertices/retain_vertices.rs index 1e662fa..85bf87d 100644 --- a/src/core/vertices/retain_vertices.rs +++ b/src/core/vertices/retain_vertices.rs @@ -35,14 +35,7 @@ where #[cfg(test)] mod tests { - use crate::{ - Hypergraph, - core::test_support::{ - E, - W, - build, - }, - }; + use crate::core::test_support::build; #[test] fn retains_matching_removes_rest() {