diff options
author | boastful-squirrel <boastful.squirrel@gmail.com> | 2019-05-03 05:28:31 +0000 |
---|---|---|
committer | boastful-squirrel <boastful.squirrel@gmail.com> | 2019-05-03 05:28:31 +0000 |
commit | 8f1793e02f0dadbab668b51850e14bd160b440d8 (patch) | |
tree | 4e125df23c71e092c3f83d0289554df980e0bb2e /src | |
parent | Print error when parsing query parameters fail (diff) | |
parent | Merge pull request #99 from KSXGitHub/new-clippy (diff) | |
download | miniserve-8f1793e02f0dadbab668b51850e14bd160b440d8.tar.gz miniserve-8f1793e02f0dadbab668b51850e14bd160b440d8.zip |
Merge branch 'master' into themed-errors
Diffstat (limited to '')
-rw-r--r-- | src/listing.rs | 1 | ||||
-rw-r--r-- | src/main.rs | 4 | ||||
-rw-r--r-- | src/renderer.rs | 1 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/listing.rs b/src/listing.rs index 2d00836..b3c21ae 100644 --- a/src/listing.rs +++ b/src/listing.rs @@ -125,6 +125,7 @@ pub fn file_handler(req: &HttpRequest<crate::MiniserveConfig>) -> Result<fs::Nam /// List a directory and renders a HTML file accordingly /// Adapted from https://docs.rs/actix-web/0.7.13/src/actix_web/fs.rs.html#564 +#[allow(clippy::identity_conversion)] pub fn directory_listing<S>( dir: &fs::Directory, req: &HttpRequest<S>, diff --git a/src/main.rs b/src/main.rs index 5c0edb7..07827c0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -83,9 +83,7 @@ fn run() -> Result<(), ContextualError> { && miniserve_config .path .symlink_metadata() - .map_err(|e| { - ContextualError::IOError("Failed to retrieve symlink's metadata".to_string(), e) - })? + .map_err(|e| ContextualError::IOError("Failed to retrieve symlink's metadata".to_string(), e))? .file_type() .is_symlink() { diff --git a/src/renderer.rs b/src/renderer.rs index cdcec94..098cf91 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -10,6 +10,7 @@ use crate::listing::{Entry, SortingMethod, SortingOrder}; use crate::themes::ColorScheme; /// Renders the file listing +#[allow(clippy::too_many_arguments)] pub fn page( serve_path: &str, entries: Vec<Entry>, |