diff options
author | Damian <damian@autistici.org> | 2019-12-20 19:56:42 +0000 |
---|---|---|
committer | Damian <damian@autistici.org> | 2019-12-20 19:56:42 +0000 |
commit | 9c02c37b18a5260f9e5f12b576d2b5d072220030 (patch) | |
tree | e0af9d84b34ce348dcf5e2778f11f6b5c7fb7818 /src | |
parent | Merge pull request #233 from svenstaro/dependabot/cargo/rstest-0.5.1 (diff) | |
download | miniserve-9c02c37b18a5260f9e5f12b576d2b5d072220030.tar.gz miniserve-9c02c37b18a5260f9e5f12b576d2b5d072220030.zip |
Fixed clippy warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/args.rs | 4 | ||||
-rw-r--r-- | src/file_upload.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/args.rs b/src/args.rs index 8fde78a..2e28e30 100644 --- a/src/args.rs +++ b/src/args.rs @@ -108,8 +108,8 @@ fn parse_auth(src: &str) -> Result<auth::RequiredAuth, ContextualError> { }; match second_part { - "sha256" => auth::RequiredAuthPassword::Sha256(hash_bin.to_owned()), - "sha512" => auth::RequiredAuthPassword::Sha512(hash_bin.to_owned()), + "sha256" => auth::RequiredAuthPassword::Sha256(hash_bin), + "sha512" => auth::RequiredAuthPassword::Sha512(hash_bin), _ => return Err(ContextualError::InvalidHashMethod(second_part.to_owned())), } } else { diff --git a/src/file_upload.rs b/src/file_upload.rs index 3ef3a7e..b79e8ff 100644 --- a/src/file_upload.rs +++ b/src/file_upload.rs @@ -197,7 +197,7 @@ pub fn upload_file( .then(move |e| match e { Ok(_) => future::ok( HttpResponse::SeeOther() - .header(header::LOCATION, return_path.to_string()) + .header(header::LOCATION, return_path) .finish(), ), Err(e) => create_error_response( |