diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2020-02-27 16:09:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 16:09:58 +0000 |
commit | 52ddbbd01addc3b18b6cef90e4a9282f5945cd43 (patch) | |
tree | d2a7c73e67bc1cc973151c98f32b4d26de9151ef /src | |
parent | Merge pull request #261 from svenstaro/dependabot/cargo/hex-0.4.2 (diff) | |
parent | Fixed clippy warnings (diff) | |
download | miniserve-52ddbbd01addc3b18b6cef90e4a9282f5945cd43.tar.gz miniserve-52ddbbd01addc3b18b6cef90e4a9282f5945cd43.zip |
Merge pull request #239 from DamianX/FixClippyWarnings
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 900792f..af4fcf2 100644 --- a/src/file_upload.rs +++ b/src/file_upload.rs @@ -201,7 +201,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( |