aboutsummaryrefslogtreecommitdiffstats
path: root/components/devtools
diff options
context:
space:
mode:
authorPeter Mikola <mikopet@mikopet.dev>2024-06-12 19:09:56 +0200
committerGitHub <noreply@github.com>2024-06-12 17:09:56 +0000
commit0a641816bf8f402800d7ecec12d2d64505975c16 (patch)
treecbd4d66d6ffa52903cdf21679c3e0c3ec4bfef94 /components/devtools
parentfd472ebd0edc8eb91155b20e95ea9acfa6e77573 (diff)
downloadservo-0a641816bf8f402800d7ecec12d2d64505975c16.tar.gz
servo-0a641816bf8f402800d7ecec12d2d64505975c16.zip
clippy fixes regarding clone_from (#32482)
Diffstat (limited to 'components/devtools')
-rw-r--r--components/devtools/actors/browsing_context.rs2
-rw-r--r--components/devtools/actors/network_event.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/components/devtools/actors/browsing_context.rs b/components/devtools/actors/browsing_context.rs
index 0f0dd5a8b1e..1058e1fe712 100644
--- a/components/devtools/actors/browsing_context.rs
+++ b/components/devtools/actors/browsing_context.rs
@@ -348,7 +348,7 @@ impl BrowsingContextActor {
}
*self.url.borrow_mut() = url.as_str().to_owned();
if let Some(ref t) = title {
- *self.title.borrow_mut() = t.clone();
+ self.title.borrow_mut().clone_from(t);
}
let msg = TabNavigated {
diff --git a/components/devtools/actors/network_event.rs b/components/devtools/actors/network_event.rs
index 2a5a4f77e65..f4382d904f9 100644
--- a/components/devtools/actors/network_event.rs
+++ b/components/devtools/actors/network_event.rs
@@ -359,7 +359,7 @@ impl NetworkEventActor {
}
pub fn add_response(&mut self, response: DevtoolsHttpResponse) {
- self.response.headers = response.headers.clone();
+ self.response.headers.clone_from(&response.headers);
self.response.status = response.status.as_ref().map(|&(s, ref st)| {
let status_text = String::from_utf8_lossy(st).into_owned();
(StatusCode::from_u16(s).unwrap(), status_text)