diff options
author | jikstra <jikstra@disroot.org> | 2021-09-10 14:45:45 +0000 |
---|---|---|
committer | jikstra <jikstra@disroot.org> | 2021-09-10 14:45:45 +0000 |
commit | da591fc995ea0189694d1f6e306d23105fa6cfc5 (patch) | |
tree | fe33c8ff31e5154c40eb328eda3958fea91606b8 /tests/utils/mod.rs | |
parent | Implement --show-wget-footer argument (diff) | |
download | miniserve-da591fc995ea0189694d1f6e306d23105fa6cfc5.tar.gz miniserve-da591fc995ea0189694d1f6e306d23105fa6cfc5.zip |
Remove unused imports and files
Diffstat (limited to 'tests/utils/mod.rs')
-rw-r--r-- | tests/utils/mod.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/utils/mod.rs b/tests/utils/mod.rs deleted file mode 100644 index b724945..0000000 --- a/tests/utils/mod.rs +++ /dev/null @@ -1,12 +0,0 @@ -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`. -pub fn get_link_from_text(document: &Document, text: &str) -> Option<String> { - let a_elem = document - .find(Name("a").and(|x: &Node| x.children().any(|x| x.text() == text))) - .next()?; - Some(a_elem.attr("href")?.to_string()) -} |