aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjikstra <jikstra@disroot.org>2021-09-10 13:51:08 +0000
committerjikstra <jikstra@disroot.org>2021-09-10 13:51:08 +0000
commit71ba52ec5dc84591ead1ac64e584f990b7d66615 (patch)
treebcd3590de3dfa80d57caba81855d75209f5593e8
parentcargo fmt & cargo clippy (diff)
downloadminiserve-71ba52ec5dc84591ead1ac64e584f990b7d66615.tar.gz
miniserve-71ba52ec5dc84591ead1ac64e584f990b7d66615.zip
Apply requested changes
-rw-r--r--data/style.scss2
-rw-r--r--src/renderer.rs4
-rw-r--r--tests/raw.rs2
3 files changed, 3 insertions, 5 deletions
diff --git a/data/style.scss b/data/style.scss
index 5a05fe7..8bdd5d7 100644
--- a/data/style.scss
+++ b/data/style.scss
@@ -53,7 +53,7 @@ body {
font-size: 0.7em;
color: var(--footer_color);
- .downloadWget {
+ .downloadDirectory {
display: flex;
flex-direction: row;
justify-content: center;
diff --git a/src/renderer.rs b/src/renderer.rs
index 45cb145..c0a243e 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -153,8 +153,8 @@ pub fn page(
}
}
}
+
/// Renders the file listing
-#[allow(clippy::too_many_arguments)]
pub fn raw(entries: Vec<Entry>, is_root: bool) -> Markup {
html! {
(DOCTYPE)
@@ -212,7 +212,7 @@ fn wget_download(title_path: &str, current_user: Option<&CurrentUser>) -> Markup
};
return html! {
- div.downloadWget {
+ div.downloadDirectory {
p { "Download folder:" }
div.cmd { (format!("wget -r -c -nH -np --cut-dirs={} -R \"index.html*\"{} \"http://{}/?raw=true\"", count, user_params, title_path)) }
}
diff --git a/tests/raw.rs b/tests/raw.rs
index 6e0c2a0..55003be 100644
--- a/tests/raw.rs
+++ b/tests/raw.rs
@@ -94,8 +94,6 @@ fn raw_mode_links_to_directories_end_with_raw_true(server: TestServer) -> Result
// Ensure the links to the archives are not present
for url in urls.iter() {
let body = client.get(url).send()?.error_for_status()?;
-
- let body = client.get(url).send()?.error_for_status()?;
let parsed = Document::from_read(body)?;
verify_a_tags(parsed);
}