From da591fc995ea0189694d1f6e306d23105fa6cfc5 Mon Sep 17 00:00:00 2001 From: jikstra Date: Fri, 10 Sep 2021 16:45:45 +0200 Subject: Remove unused imports and files --- tests/raw.rs | 4 ---- tests/utils/mod.rs | 12 ------------ 2 files changed, 16 deletions(-) delete mode 100644 tests/utils/mod.rs diff --git a/tests/raw.rs b/tests/raw.rs index ed46314..ea9b3a6 100644 --- a/tests/raw.rs +++ b/tests/raw.rs @@ -2,7 +2,6 @@ mod fixtures; mod utils; use crate::fixtures::TestServer; -use assert_cmd::prelude::*; use fixtures::{server, Error}; use pretty_assertions::assert_eq; use reqwest::blocking::Client; @@ -10,9 +9,6 @@ use rstest::rstest; use select::document::Document; use select::predicate::Class; use select::predicate::Name; -use std::process::{Command, Stdio}; -use std::thread::sleep; -use std::time::Duration; #[rstest] /// The ui displays the correct wget command to download the folder recursively 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 { - 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()) -} -- cgit v1.2.3