mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
clippy fixes regarding clone_from (#32482)
This commit is contained in:
parent
fd472ebd0e
commit
0a641816bf
12 changed files with 35 additions and 19 deletions
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue