We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a3f215 commit 085934eCopy full SHA for 085934e
src/webserver/http_request_info.rs
@@ -41,6 +41,7 @@ pub struct RequestInfo {
41
}
42
43
impl RequestInfo {
44
+ #[must_use]
45
pub fn clone_without_variables(&self) -> Self {
46
Self {
47
method: self.method.clone(),
@@ -62,8 +63,8 @@ impl RequestInfo {
62
63
impl Clone for RequestInfo {
64
fn clone(&self) -> Self {
65
let mut clone = self.clone_without_variables();
- clone.get_variables = self.get_variables.clone();
66
- clone.post_variables = self.post_variables.clone();
+ clone.get_variables.clone_from(&self.get_variables);
67
+ clone.post_variables.clone_from(&self.post_variables);
68
clone
69
70
0 commit comments