From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox 5/6] rest: do not convert string to string
Date: Wed, 28 Feb 2024 12:39:19 +0100 [thread overview]
Message-ID: <20240228113920.302844-5-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20240228113920.302844-1-m.sandoval@proxmox.com>
Fixes the clippy warning:
warning: useless conversion to the same type: `std::string::String`
--> proxmox-rest-server/src/rest.rs:158:41
|
158 | .header("Location", String::from(location_value))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `location_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
proxmox-rest-server/src/rest.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proxmox-rest-server/src/rest.rs b/proxmox-rest-server/src/rest.rs
index 4900592d..39ae9a18 100644
--- a/proxmox-rest-server/src/rest.rs
+++ b/proxmox-rest-server/src/rest.rs
@@ -155,7 +155,7 @@ impl Service<Request<Body>> for RedirectService {
Response::builder()
.status(status_code)
- .header("Location", String::from(location_value))
+ .header("Location", location_value)
.body(Body::empty())?
} else {
Response::builder()
--
2.39.2
next prev parent reply other threads:[~2024-02-28 11:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 11:39 [pbs-devel] [PATCH proxmox 1/6] acme: Default `impl` can be derived Maximiliano Sandoval
2024-02-28 11:39 ` [pbs-devel] [PATCH proxmox 2/6] remove needless_borrow Maximiliano Sandoval
2024-02-28 11:39 ` [pbs-devel] [PATCH proxmox 3/6] io: remove unnecesary cast to *mut u8 Maximiliano Sandoval
2024-02-28 11:39 ` [pbs-devel] [PATCH proxmox 4/6] schema: de: don't use while where we don't loop Maximiliano Sandoval
2024-02-28 11:39 ` Maximiliano Sandoval [this message]
2024-02-28 11:39 ` [pbs-devel] [PATCH proxmox 6/6] rrd: use unwrap_or_default when possible Maximiliano Sandoval
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240228113920.302844-5-m.sandoval@proxmox.com \
--to=m.sandoval@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.