From 1fdbbd5f5759544f6e9c28c435d2e925fb7fbd61 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Thu, 12 Sep 2024 02:49:34 +0200 Subject: Fix lints --- tests/utils/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/utils') diff --git a/tests/utils/mod.rs b/tests/utils/mod.rs index baffc29..ac90bff 100644 --- a/tests/utils/mod.rs +++ b/tests/utils/mod.rs @@ -26,5 +26,5 @@ pub fn get_link_hrefs_with_prefix(document: &Document, prefix: &str) -> Vec Date: Fri, 10 Jan 2025 16:32:11 +0100 Subject: Remove some unnecessary #[allow(dead_code)] --- tests/utils/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/utils') diff --git a/tests/utils/mod.rs b/tests/utils/mod.rs index ac90bff..c392b14 100644 --- a/tests/utils/mod.rs +++ b/tests/utils/mod.rs @@ -1,11 +1,10 @@ -#![allow(dead_code)] - use select::document::Document; use select::node::Node; use select::predicate::Name; use select::predicate::Predicate; /// Return the href attribute content for the closest anchor found by `text`. +#[allow(dead_code)] pub fn get_link_from_text(document: &Document, text: &str) -> Option { let a_elem = document .find(Name("a").and(|x: &Node| x.children().any(|x| x.text() == text))) @@ -14,6 +13,7 @@ pub fn get_link_from_text(document: &Document, text: &str) -> Option { } /// Return the href attributes of all links that start with the specified `prefix`. +#[allow(dead_code)] pub fn get_link_hrefs_with_prefix(document: &Document, prefix: &str) -> Vec { let mut vec: Vec = Vec::new(); -- cgit v1.2.3 From 4dc634655edac54e9638e8390d89a96e235522c0 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 10 Jan 2025 17:23:00 +0100 Subject: Reorganize imports to be more consistent --- tests/utils/mod.rs | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests/utils') diff --git a/tests/utils/mod.rs b/tests/utils/mod.rs index c392b14..792b070 100644 --- a/tests/utils/mod.rs +++ b/tests/utils/mod.rs @@ -4,7 +4,6 @@ use select::predicate::Name; use select::predicate::Predicate; /// Return the href attribute content for the closest anchor found by `text`. -#[allow(dead_code)] pub fn get_link_from_text(document: &Document, text: &str) -> Option { let a_elem = document .find(Name("a").and(|x: &Node| x.children().any(|x| x.text() == text))) @@ -13,7 +12,6 @@ pub fn get_link_from_text(document: &Document, text: &str) -> Option { } /// Return the href attributes of all links that start with the specified `prefix`. -#[allow(dead_code)] pub fn get_link_hrefs_with_prefix(document: &Document, prefix: &str) -> Vec { let mut vec: Vec = Vec::new(); -- cgit v1.2.3