aboutsummaryrefslogtreecommitdiffstats
path: root/src/listing.rs
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2020-03-11 18:27:10 +0000
committerSven-Hendrik Haase <svenstaro@gmail.com>2020-03-11 18:27:10 +0000
commit27cb41d4ffece4867b23065a6602ed9b8843c418 (patch)
tree2053dcb3f49e3887edf9ade7eb07da7ecdc0bc65 /src/listing.rs
parentUpdate CHANGELOG.md (diff)
downloadminiserve-27cb41d4ffece4867b23065a6602ed9b8843c418.tar.gz
miniserve-27cb41d4ffece4867b23065a6602ed9b8843c418.zip
Format everything
Diffstat (limited to 'src/listing.rs')
-rw-r--r--src/listing.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/listing.rs b/src/listing.rs
index 256e062..d28824c 100644
--- a/src/listing.rs
+++ b/src/listing.rs
@@ -1,5 +1,5 @@
-use actix_web::{fs, Body, FromRequest, HttpRequest, HttpResponse, Query, Result};
use actix_web::http::StatusCode;
+use actix_web::{fs, Body, FromRequest, HttpRequest, HttpResponse, Query, Result};
use bytesize::ByteSize;
use futures::Stream;
use htmlescape::encode_minimal as escape_html_entity;
@@ -172,8 +172,7 @@ pub fn directory_listing<S>(
Err(_) => continue,
};
// show file url as relative to static path
- let file_url =
- utf8_percent_encode(&p.to_string_lossy(), FRAGMENT).to_string();
+ let file_url = utf8_percent_encode(&p.to_string_lossy(), FRAGMENT).to_string();
// " -- &quot; & -- &amp; ' -- &#x27; < -- &lt; > -- &gt;
let file_name = escape_html_entity(&entry.file_name().to_string_lossy());
@@ -265,9 +264,9 @@ pub fn directory_listing<S>(
default_color_scheme,
false,
false,
- ).into_string()
- )
- );
+ )
+ .into_string(),
+ ));
}
log::info!(
"Creating an archive ({extension}) of {path}...",